// source --> https://demolicionescordoba.es/wp-content/plugins/photo-gallery/js/scripts.min.js var bwg_current_filmstrip_pos,total_thumbnail_count,key,startPoint,endPoint,bwg_image_info_pos,filmstrip_width,preloadCount,filmstrip_thumbnail_width,filmstrip_thumbnail_height,addthis_share,lightbox_comment_pos,bwg_transition_duration,bwg_playInterval,isPopUpOpened=!1,bwg_overflow_initial_value=!1,bwg_overflow_x_initial_value=!1,bwg_overflow_y_initial_value=!1;function gallery_box_ready(){filmstrip_thumbnail_width=jQuery(".bwg_filmstrip_thumbnail").width(),filmstrip_thumbnail_height=jQuery(".bwg_filmstrip_thumbnail").height(),1==gallery_box_data.open_with_fullscreen?(filmstrip_width=jQuery(window).width(),filmstrip_height=jQuery(window).height()):(filmstrip_width=jQuery(".bwg_filmstrip_container").width(),filmstrip_height=jQuery(".bwg_filmstrip_container").height()),preloadCount="horizontal"==gallery_box_data.filmstrip_direction?parseInt(filmstrip_width/filmstrip_thumbnail_width)+gallery_box_data.preload_images_count:parseInt(filmstrip_height/filmstrip_thumbnail_height)+gallery_box_data.preload_images_count,total_thumbnail_count=jQuery(".bwg_filmstrip_thumbnail").length,key=parseInt(jQuery("#bwg_current_image_key").val()),startPoint=0,endPoint=key+preloadCount,jQuery(function(){bwg_load_visible_images(key,preloadCount,total_thumbnail_count),jQuery(".pge_tabs li a").on("click",function(){return jQuery(".pge_tabs_container > div").hide(),jQuery(".pge_tabs li").removeClass("pge_active"),jQuery(jQuery(this).attr("href")).show(),jQuery(this).closest("li").addClass("pge_active"),jQuery("[name=type]").val(jQuery(this).attr("href").substr(1)),!1});var e=jQuery("#bwg_rated").attr("data-params");bwg_rating((e=JSON.parse(e)).current_rate,e.current_rate_count,e.current_avg_rating,e.current_image_key)}),1==gallery_box_data.is_pro&&1==gallery_box_data.enable_addthis&&gallery_box_data.addthis_profile_id&&(addthis_share={url:gallery_box_data.share_url}),lightbox_comment_pos=gallery_box_data.lightbox_comment_pos,bwg_image_info_pos=jQuery(".bwg_ctrl_btn_container").length?jQuery(".bwg_ctrl_btn_container").height():0,bwg_transition_duration=gallery_box_data.slideshow_interval<4*gallery_box_data.slideshow_effect_duration&&0!=gallery_box_data.slideshow_interval?1e3*gallery_box_data.slideshow_interval/4:1e3*gallery_box_data.slideshow_effect_duration,gallery_box_data.bwg_transition_duration=bwg_transition_duration,gallery_box_data.bwg_trans_in_progress=!1,(jQuery("#spider_popup_wrap").width()>=jQuery(window).width()||jQuery("#spider_popup_wrap").height()>=jQuery(window).height())&&jQuery(".spider_popup_close").attr("class","bwg_ctrl_btn spider_popup_close_fullscreen"),window.clearInterval(bwg_playInterval),bwg_current_filmstrip_pos=gallery_box_data.current_pos,jQuery(document).on("keydown",function(e){jQuery("#bwg_name").is(":focus")||jQuery("#bwg_email").is(":focus")||jQuery("#bwg_comment").is(":focus")||jQuery("#bwg_captcha_input").is(":focus")||("ArrowRight"==e.key?parseInt(jQuery("#bwg_current_image_key").val())==gallery_box_data.data.length-1?bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),0):bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),parseInt(jQuery("#bwg_current_image_key").val())+1):"ArrowLeft"==e.key?0==parseInt(jQuery("#bwg_current_image_key").val())?bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),gallery_box_data.data.length-1):bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),parseInt(jQuery("#bwg_current_image_key").val())-1):"Escape"==e.key?spider_destroypopup(1e3):"Space"==e.key&&jQuery(".bwg_play_pause").trigger("click"))}),jQuery(window).resize(function(){void 0!==jQuery().fullscreen&&jQuery.isFunction(jQuery().fullscreen)&&(jQuery.fullscreen.isFullScreen()||bwg_popup_resize())});var r=gallery_box_data.image_width,_=gallery_box_data.image_height;if(1==gallery_box_data.is_pro){1==gallery_box_data.enable_addthis&&gallery_box_data.addthis_profile_id&&jQuery(".at4-share-outer").show(),spider_set_input_value("rate_ajax_task","save_hit_count"),spider_rate_ajax_save("bwg_rate_form");var e=gallery_box_data.data,t=gallery_box_data.current_image_key;jQuery(".bwg_image_hits span").html(++e[t].hit_count);var i=window.location.hash;i&&"-1"!=i.indexOf("bwg")||(location.replace("#bwg"+gallery_box_data.gallery_id+"/"+gallery_box_data.current_image_id),history.replaceState(void 0,void 0,"#bwg"+gallery_box_data.gallery_id+"/"+gallery_box_data.current_image_id))}1==gallery_box_data.image_right_click&&(jQuery(".bwg_image_wrap").bind("contextmenu",function(e){return!1}),jQuery(".bwg_image_wrap").css("webkitTouchCallout","none")),jQuery("#spider_popup_wrap").bind("touchmove",function(e){e.preventDefault()}),void 0!==jQuery().swiperight&&jQuery.isFunction(jQuery().swiperight)&&jQuery("#spider_popup_wrap .bwg_image_wrap").swiperight(function(){return bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),(parseInt(jQuery("#bwg_current_image_key").val())+gallery_box_data.data.length-1)%gallery_box_data.data.length),!1}),void 0!==jQuery().swipeleft&&jQuery.isFunction(jQuery().swipeleft)&&jQuery("#spider_popup_wrap .bwg_image_wrap").swipeleft(function(){return bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),(parseInt(jQuery("#bwg_current_image_key").val())+1)%gallery_box_data.data.length),!1}),bwg_reset_zoom();var a=/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase())?"touchend":"click";jQuery("#spider_popup_left").on(a,function(){return bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),(parseInt(jQuery("#bwg_current_image_key").val())+gallery_box_data.data.length-1)%gallery_box_data.data.length),!1}),jQuery("#spider_popup_right").on(a,function(){return bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),(parseInt(jQuery("#bwg_current_image_key").val())+1)%gallery_box_data.data.length),!1}),-1!=navigator.appVersion.indexOf("MSIE 10")||-1!=navigator.appVersion.indexOf("MSIE 9")?setTimeout(function(){bwg_popup_resize()},1):bwg_popup_resize(),jQuery(".bwg_watermark").css({display:"none"}),setTimeout(function(){bwg_change_watermark_container()},500),void 0!==jQuery().fullscreen&&jQuery.isFunction(jQuery().fullscreen)&&(jQuery.fullscreen.isNativelySupported()||jQuery(".bwg_fullscreen").hide()),"horizontal"==gallery_box_data.filmstrip_direction?(jQuery(".bwg_image_container").height(jQuery(".bwg_image_wrap").height()-gallery_box_data.image_filmstrip_height),jQuery(".bwg_image_container").width(jQuery(".bwg_image_wrap").width())):(jQuery(".bwg_image_container").height(jQuery(".bwg_image_wrap").height()),jQuery(".bwg_image_container").width(jQuery(".bwg_image_wrap").width()-gallery_box_data.image_filmstrip_width)),void 0!==jQuery().mCustomScrollbar&&jQuery.isFunction(jQuery().mCustomScrollbar)&&jQuery(".bwg_comments,.bwg_ecommerce_panel, .bwg_image_info").mCustomScrollbar({scrollInertia:150,theme:"dark-thick",advanced:{updateOnContentResize:!0}});var s=/Firefox/i.test(navigator.userAgent)?"DOMMouseScroll":"mousewheel";jQuery(".bwg_filmstrip").on(s,function(e){var t=window.event||e,i=(t=t.originalEvent?t.originalEvent:t).detail?-40*t.detail:t.wheelDelta,a=/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase());0=-(jQuery(".bwg_filmstrip_thumbnails").width()-jQuery(".bwg_filmstrip").width())&&(jQuery(".bwg_filmstrip_left").css({opacity:1}),jQuery(".bwg_filmstrip_thumbnails").position().left<-(jQuery(".bwg_filmstrip_thumbnails").width()-jQuery(".bwg_filmstrip").width()-(gallery_box_data.filmstrip_thumb_right_left_space+gallery_box_data.image_filmstrip_width+gallery_box_data.all_images_right_left_space))?jQuery(".bwg_filmstrip_thumbnails").animate({left:-(jQuery(".bwg_filmstrip_thumbnails").width()-jQuery(".bwg_filmstrip").width()-gallery_box_data.all_images_right_left_space)},500,"linear"):jQuery(".bwg_filmstrip_thumbnails").animate({left:jQuery(".bwg_filmstrip_thumbnails").position().left-(gallery_box_data.filmstrip_thumb_right_left_space+gallery_box_data.image_filmstrip_width)},500,"linear")),window.setTimeout(function(){jQuery(".bwg_filmstrip_thumbnails").position().left==-(jQuery(".bwg_filmstrip_thumbnails").width()-jQuery(".bwg_filmstrip").width())&&jQuery(".bwg_filmstrip_right").css({opacity:.3})},500)):(jQuery(".bwg_filmstrip_thumbnails").position().left>=-(jQuery(".bwg_filmstrip_thumbnails").height()-jQuery(".bwg_filmstrip").height())&&(jQuery(".bwg_filmstrip_left").css({opacity:1}),jQuery(".bwg_filmstrip_thumbnails").position().left<-(jQuery(".bwg_filmstrip_thumbnails").height()-jQuery(".bwg_filmstrip").height()-(gallery_box_data.filmstrip_thumb_right_left_space+gallery_box_data.image_filmstrip_width+gallery_box_data.all_images_right_left_space))?jQuery(".bwg_filmstrip_thumbnails").animate({left:-(jQuery(".bwg_filmstrip_thumbnails").height()-jQuery(".bwg_filmstrip").height()-gallery_box_data.all_images_right_left_space)},500,"linear"):jQuery(".bwg_filmstrip_thumbnails").animate({left:jQuery(".bwg_filmstrip_thumbnails").position().left-(gallery_box_data.filmstrip_thumb_right_left_space+gallery_box_data.image_filmstrip_width)},500,"linear")),window.setTimeout(function(){jQuery(".bwg_filmstrip_thumbnails").position().left==-(jQuery(".bwg_filmstrip_thumbnails").height()-jQuery(".bwg_filmstrip").height())&&jQuery(".bwg_filmstrip_right").css({opacity:.3})},500)):"width"==gallery_box_data.width_or_height?(jQuery(".bwg_filmstrip_thumbnails").position().top>=-(jQuery(".bwg_filmstrip_thumbnails").width()-jQuery(".bwg_filmstrip").width())&&(jQuery(".bwg_filmstrip_left").css({opacity:1}),jQuery(".bwg_filmstrip_thumbnails").position().top<-(jQuery(".bwg_filmstrip_thumbnails").width()-jQuery(".bwg_filmstrip").width()-(gallery_box_data.filmstrip_thumb_right_left_space+gallery_box_data.image_filmstrip_width+gallery_box_data.all_images_right_left_space))?jQuery(".bwg_filmstrip_thumbnails").animate({left:-(jQuery(".bwg_filmstrip_thumbnails").width()-jQuery(".bwg_filmstrip").width()-gallery_box_data.all_images_right_left_space)},500,"linear"):jQuery(".bwg_filmstrip_thumbnails").animate({left:jQuery(".bwg_filmstrip_thumbnails").position().top-(gallery_box_data.filmstrip_thumb_right_left_space+gallery_box_data.image_filmstrip_width)},500,"linear")),window.setTimeout(function(){jQuery(".bwg_filmstrip_thumbnails").position().left==-(jQuery(".bwg_filmstrip_thumbnails").width()-jQuery(".bwg_filmstrip").width())&&jQuery(".bwg_filmstrip_right").css({opacity:.3})},500)):(jQuery(".bwg_filmstrip_thumbnails").position().top>=-(jQuery(".bwg_filmstrip_thumbnails").height()-jQuery(".bwg_filmstrip").height())&&(jQuery(".bwg_filmstrip_left").css({opacity:1}),jQuery(".bwg_filmstrip_thumbnails").position().top<-(jQuery(".bwg_filmstrip_thumbnails").height()-jQuery(".bwg_filmstrip").height()-(gallery_box_data.filmstrip_thumb_right_left_space+gallery_box_data.image_filmstrip_width+gallery_box_data.all_images_right_left_space))?jQuery(".bwg_filmstrip_thumbnails").animate({top:-(jQuery(".bwg_filmstrip_thumbnails").height()-jQuery(".bwg_filmstrip").height()-gallery_box_data.all_images_right_left_space)},500,"linear"):jQuery(".bwg_filmstrip_thumbnails").animate({top:jQuery(".bwg_filmstrip_thumbnails").position().top-(gallery_box_data.filmstrip_thumb_right_left_space+gallery_box_data.image_filmstrip_width)},500,"linear")),window.setTimeout(function(){jQuery(".bwg_filmstrip_thumbnails").position().left==-(jQuery(".bwg_filmstrip_thumbnails").height()-jQuery(".bwg_filmstrip").height())&&jQuery(".bwg_filmstrip_right").css({opacity:.3})},500))}),"left"==gallery_box_data.left_or_top?jQuery(".bwg_filmstrip_left").on(a,function(){jQuery(".bwg_filmstrip_thumbnails").stop(!0,!1),jQuery(".bwg_filmstrip_thumbnails").position().left<0&&(jQuery(".bwg_filmstrip_right").css({opacity:1}),jQuery(".bwg_filmstrip_thumbnails").position().left>-(gallery_box_data.filmstrip_thumb_right_left_space+gallery_box_data.image_filmstrip_width)?jQuery(".bwg_filmstrip_thumbnails").animate({left:0},500,"linear"):jQuery(".bwg_filmstrip_thumbnails").animate({left:jQuery(".bwg_filmstrip_thumbnails").position().left+gallery_box_data.image_filmstrip_width+gallery_box_data.filmstrip_thumb_right_left_space},500,"linear")),window.setTimeout(function(){0==jQuery(".bwg_filmstrip_thumbnails").position().left&&jQuery(".bwg_filmstrip_left").css({opacity:.3})},500)}):jQuery(".bwg_filmstrip_left").on(a,function(){jQuery(".bwg_filmstrip_thumbnails").stop(!0,!1),jQuery(".bwg_filmstrip_thumbnails").position().top<0&&(jQuery(".bwg_filmstrip_right").css({opacity:1}),jQuery(".bwg_filmstrip_thumbnails").position().top>-(gallery_box_data.filmstrip_thumb_right_left_space+gallery_box_data.image_filmstrip_width)?jQuery(".bwg_filmstrip_thumbnails").animate({top:0},500,"linear"):jQuery(".bwg_filmstrip_thumbnails").animate({top:jQuery(".bwg_filmstrip_thumbnails").position().top+gallery_box_data.image_filmstrip_width+gallery_box_data.filmstrip_thumb_right_left_space},500,"linear")),window.setTimeout(function(){0==jQuery(".bwg_filmstrip_thumbnails").position().top&&jQuery(".bwg_filmstrip_left").css({opacity:.3})},500)}),"width"==gallery_box_data.width_or_height?bwg_set_filmstrip_pos(jQuery(".bwg_filmstrip").width(),"",gallery_box_data):bwg_set_filmstrip_pos(jQuery(".bwg_filmstrip").height(),"",gallery_box_data),jQuery(".bwg_info").on(a,function(){if("none"==jQuery(".bwg_image_info_container1").css("display")){jQuery(".bwg_image_info_container1").css("display","table-cell"),jQuery(".bwg_info").attr("title",bwg_objectsL10n.bwg_hide_info);jQuery(".bwg_ctrl_btn_container").length&&jQuery(".bwg_ctrl_btn_container").height();jQuery(".bwg_image_info").css("height","auto"),bwg_info_height_set()}else jQuery(".bwg_image_info_container1").css("display","none"),jQuery(".bwg_info").attr("title",bwg_objectsL10n.bwg_show_info)}),jQuery(".bwg_rate").on(a,function(){"none"==jQuery(".bwg_image_rate_container1").css("display")?(jQuery(".bwg_image_rate_container1").css("display","table-cell"),jQuery(".bwg_rate").attr("title",bwg_objectsL10n.bwg_hide_rating)):(jQuery(".bwg_image_rate_container1").css("display","none"),jQuery(".bwg_rate").attr("title",bwg_objectsL10n.bwg_show_rating))}),jQuery(".bwg_comment, .bwg_comments_close_btn").on(a,function(){bwg_comment()}),jQuery(".bwg_ecommerce, .bwg_ecommerce_close_btn").on(a,function(){bwg_ecommerce()}),jQuery(".bwg_toggle_container").on(a,function(){var e="top"==gallery_box_data.lightbox_ctrl_btn_pos?"bwg-icon-caret-up":"bwg-icon-caret-down",t="top"==gallery_box_data.lightbox_ctrl_btn_pos?"bwg-icon-caret-down":"bwg-icon-caret-up";jQuery(".bwg_toggle_container i").hasClass(e)?(gallery_box_data.enable_image_filmstrip&&"bottom"==gallery_box_data.lightbox_filmstrip_pos||"bottom"!=gallery_box_data.lightbox_ctrl_btn_pos||"bottom"!=gallery_box_data.lightbox_rate_pos?gallery_box_data.enable_image_filmstrip&&"top"==gallery_box_data.lightbox_filmstrip_pos||"top"!=gallery_box_data.lightbox_ctrl_btn_pos||"top"!=gallery_box_data.lightbox_rate_pos||jQuery(".bwg_image_rate").animate({top:0},500):jQuery(".bwg_image_rate").animate({bottom:0},500),gallery_box_data.enable_image_filmstrip&&"bottom"==gallery_box_data.lightbox_filmstrip_pos||"bottom"!=gallery_box_data.lightbox_ctrl_btn_pos||"bottom"!=gallery_box_data.lightbox_hit_pos?gallery_box_data.enable_image_filmstrip&&"top"==gallery_box_data.lightbox_filmstrip_pos||"top"!=gallery_box_data.lightbox_ctrl_btn_pos||"top"!=gallery_box_data.lightbox_hit_pos||jQuery(".bwg_image_hit").animate({top:0},500):jQuery(".bwg_image_hit").animate({bottom:0},500),"bottom"==gallery_box_data.lightbox_ctrl_btn_pos?(jQuery(".bwg_ctrl_btn_container").animate({bottom:"-"+jQuery(".bwg_ctrl_btn_container").height()},500).addClass("closed"),jQuery(".bwg_toggle_container").animate({bottom:0},{duration:500,complete:function(){jQuery(".bwg_toggle_container i").attr("class","bwg_toggle_btn "+t)}})):(jQuery(".bwg_ctrl_btn_container").animate({top:"-"+jQuery(".bwg_ctrl_btn_container").height()},500).addClass("closed"),jQuery(".bwg_toggle_container").animate({top:0},{duration:500,complete:function(){jQuery(".bwg_toggle_container i").attr("class","bwg_toggle_btn "+t)}}))):(gallery_box_data.enable_image_filmstrip&&"bottom"==gallery_box_data.lightbox_filmstrip_pos||"bottom"!=gallery_box_data.lightbox_ctrl_btn_pos||"bottom"!=gallery_box_data.lightbox_rate_pos?gallery_box_data.enable_image_filmstrip&&"top"==gallery_box_data.lightbox_filmstrip_pos||"top"!=gallery_box_data.lightbox_ctrl_btn_pos||"top"!=gallery_box_data.lightbox_rate_pos||jQuery(".bwg_image_rate").animate({top:jQuery(".bwg_ctrl_btn_container").height()},500):jQuery(".bwg_image_rate").animate({bottom:jQuery(".bwg_ctrl_btn_container").height()},500),gallery_box_data.enable_image_filmstrip&&"bottom"==gallery_box_data.lightbox_filmstrip_pos||"bottom"!=gallery_box_data.lightbox_ctrl_btn_pos||"bottom"!=gallery_box_data.lightbox_hit_pos?gallery_box_data.enable_image_filmstrip&&"top"==gallery_box_data.lightbox_filmstrip_pos||"top"!=gallery_box_data.lightbox_ctrl_btn_pos||"top"!=gallery_box_data.lightbox_hit_pos||jQuery(".bwg_image_hit").animate({top:jQuery(".bwg_ctrl_btn_container").height()},500):jQuery(".bwg_image_hit").animate({bottom:jQuery(".bwg_ctrl_btn_container").height()},500),"bottom"==gallery_box_data.lightbox_ctrl_btn_pos?(jQuery(".bwg_ctrl_btn_container").animate({bottom:0},500).removeClass("closed"),jQuery(".bwg_toggle_container").animate({bottom:jQuery(".bwg_ctrl_btn_container").height()},{duration:500,complete:function(){jQuery(".bwg_toggle_container i").attr("class","bwg_toggle_btn "+e)}})):(jQuery(".bwg_ctrl_btn_container").animate({top:0},500).removeClass("closed"),jQuery(".bwg_toggle_container").animate({top:jQuery(".bwg_ctrl_btn_container").height()},{duration:500,complete:function(){jQuery(".bwg_toggle_container i").attr("class","bwg_toggle_btn "+e)}}))),bwg_info_position(!0)});var o=window.innerHeight;jQuery(".bwg_resize-full").on(a,function(){bwg_resize_full()}),jQuery(".bwg_fullscreen").on(a,function(){jQuery(".bwg_watermark").css({display:"none"});var e,t=0;if((jQuery(".bwg_comment_container").hasClass("bwg_open")||jQuery(".bwg_ecommerce_container").hasClass("bwg_open"))&&(t=jQuery(".bwg_comment_container").width()||jQuery(".bwg_ecommerce_container").width()),void 0!==jQuery().fullscreen&&jQuery.isFunction(jQuery().fullscreen))if(jQuery.fullscreen.isFullScreen())jQuery.fullscreen.exit(),e=o,jQuery(window).width()>gallery_box_data.image_width&&(r=gallery_box_data.image_width),window.innerHeight>gallery_box_data.image_height&&(_=gallery_box_data.image_height),gallery_box_data.open_with_fullscreen&&(r=jQuery(window).width(),_=e),jQuery("#spider_popup_wrap").on("fscreenclose",function(){jQuery("#spider_popup_wrap").css({width:r,height:_,left:"50%",top:"50%",marginLeft:-r/2,marginTop:-_/2,zIndex:1e5}),jQuery(".bwg_image_wrap").css({width:r-t}),jQuery(".bwg_image_container").css({height:_-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0),width:r-t-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)}),jQuery(".bwg_image_info").css("height","auto"),bwg_info_height_set(),jQuery(".bwg_popup_image").css({maxWidth:r-t-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:_-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").css({maxWidth:r-t-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:_-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),bwg_resize_instagram_post(),bwg_change_watermark_container(),"width"==gallery_box_data.width_or_height?(jQuery(".bwg_filmstrip_container").css({width:r-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)}),jQuery(".bwg_filmstrip").css({width:r-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())}),bwg_set_filmstrip_pos(r-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data)):(jQuery(".bwg_filmstrip_container").css({height:_-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)}),jQuery(".bwg_filmstrip").css({height:_-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())}),bwg_set_filmstrip_pos(_-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data),"horizontal"!=gallery_box_data.filmstrip_direction&&jQuery(".bwg_filmstrip_right").css({top:_-jQuery(".bwg_filmstrip_right").height()})),jQuery(".bwg_resize-full").show(),jQuery(".bwg_resize-full").attr("class","bwg-icon-expand bwg_ctrl_btn bwg_resize-full"),jQuery(".bwg_resize-full").attr("title",bwg_objectsL10n.bwg_maximize),jQuery(".bwg_fullscreen").attr("class","bwg-icon-arrows-out bwg_ctrl_btn bwg_fullscreen"),jQuery(".bwg_fullscreen").attr("title",bwg_objectsL10n.bwg_fullscreen),jQuery("#spider_popup_wrap").width() .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").css({maxWidth:i-t-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:a-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),bwg_resize_instagram_post(),bwg_change_watermark_container(),"width"==gallery_box_data.width_or_height?(jQuery(".bwg_filmstrip_container").css({width:i-("horizontal"==gallery_box_data.filmstrip_direction?t:0)},500),jQuery(".bwg_filmstrip").css({width:i-("horizontal"==gallery_box_data.filmstrip_direction?t:0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())},500),bwg_set_filmstrip_pos(i-("horizontal"==gallery_box_data.filmstrip_direction?t:0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data)):(jQuery(".bwg_filmstrip_container").css({height:a-("horizontal"==gallery_box_data.filmstrip_direction)?"comment_container_width":0}),jQuery(".bwg_filmstrip").css({height:a-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())}),bwg_set_filmstrip_pos(a-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data),"horizontal"!=gallery_box_data.filmstrip_direction&&jQuery(".bwg_filmstrip_right").css({top:a-jQuery(".bwg_filmstrip_right").height()})),jQuery(".bwg_resize-full").hide(),jQuery(".bwg_fullscreen").attr("class","bwg-icon-compress bwg_ctrl_btn bwg_fullscreen"),jQuery(".bwg_fullscreen").attr("title",bwg_objectsL10n.bwg_exit_fullscreen),jQuery(".spider_popup_close").attr("class","bwg_ctrl_btn spider_popup_close_fullscreen")}return!1}),jQuery(".bwg_play_pause").on(a,function(){jQuery(".bwg_play_pause").length&&jQuery(".bwg_play_pause").hasClass("bwg-icon-play")&&!jQuery(".bwg_comment_container").hasClass("bwg_open")?(bwg_play(gallery_box_data.data),jQuery(".bwg_play_pause").attr("title",bwg_objectsL10n.bwg_pause),jQuery(".bwg_play_pause").attr("class","bwg-icon-pause bwg_ctrl_btn bwg_play_pause")):(window.clearInterval(bwg_playInterval),jQuery(".bwg_play_pause").attr("title",bwg_objectsL10n.bwg_play),jQuery(".bwg_play_pause").attr("class","bwg-icon-play bwg_ctrl_btn bwg_play_pause"))}),gallery_box_data.open_with_autoplay&&(bwg_play(gallery_box_data.data),jQuery(".bwg_play_pause").attr("title",bwg_objectsL10n.bwg_pause),jQuery(".bwg_play_pause").attr("class","bwg-icon-pause bwg_ctrl_btn bwg_play_pause")),gallery_box_data.open_with_fullscreen&&bwg_open_with_fullscreen(),jQuery(".bwg_popup_image").removeAttr("width"),jQuery(".bwg_popup_image").removeAttr("height"),jQuery(window).focus(function(){jQuery(".bwg_play_pause").length&&!jQuery(".bwg_play_pause").hasClass("bwg-icon-play")&&bwg_play(gallery_box_data.data)}),jQuery(window).blur(function(){event_stack=[],window.clearInterval(bwg_playInterval)});gallery_box_data.lightbox_ctrl_btn_pos;1==gallery_box_data.open_ecommerce&&setTimeout(function(){bwg_ecommerce()},400),1==gallery_box_data.open_comment&&bwg_comment()}function spider_createpopup(e,t,i,a,r,_,s,o){e=e.replace(/&/g,"&"),isPopUpOpened||(isPopUpOpened=!0,spider_isunsupporteduseragent()||(bwg_overflow_initial_value=jQuery("html").css("overflow"),bwg_overflow_x_initial_value=jQuery("html").css("overflow-x"),bwg_overflow_y_initial_value=jQuery("html").css("overflow-y"),jQuery("html").attr("style","overflow:hidden !important;"),jQuery("#bwg_spider_popup_loading_"+t).show(),jQuery("#spider_popup_overlay_"+t).css({display:"block"}),jQuery.ajax({type:"GET",url:e,success:function(e){var t=jQuery('
'+e+"
").hide().appendTo("body");gallery_box_ready(),spider_showpopup(_,s,t,r,o)},beforeSend:function(){},complete:function(){}})))}function spider_showpopup(e,t,i,a,r){var _=gallery_box_data.data,s=parseInt(jQuery("#bwg_current_image_key").val());void 0!==_[s]&&(isPopUpOpened=!0,-1<_[s].filetype.indexOf("EMBED_")?bwg_first_image_load(i,r):jQuery("#spider_popup_wrap .bwg_popup_image_spun img").prop("complete")?bwg_first_image_load(i,r):jQuery("#spider_popup_wrap .bwg_popup_image_spun img").on("load error",function(){bwg_first_image_load(i,r)}),"EMBED_OEMBED_INSTAGRAM_POST"==_[s].filetype&&"undefined"!=typeof instgrm&&void 0!==instgrm.Embeds&&instgrm.Embeds.process())}function bwg_first_image_load(e,t){e.show(),""==gallery_box_data.data[key].alt&&""==gallery_box_data.data[key].description?jQuery(".bwg_info").hide():jQuery(".bwg_info").show();var i=jQuery(".bwg_ctrl_btn_container").height();"bottom"==t?jQuery(".bwg_toggle_container").css("bottom",i+"px"):"top"==t&&jQuery(".bwg_toggle_container").css("top",i+"px"),jQuery(".bwg_spider_popup_loading").hide(),1==gallery_box_data.preload_images&&bwg_preload_images(parseInt(jQuery("#bwg_current_image_key").val())),bwg_load_filmstrip(),bwg_info_height_set()}function spider_isunsupporteduseragent(){return!window.XMLHttpRequest}function spider_destroypopup(e){null!=document.getElementById("spider_popup_wrap")&&(void 0!==jQuery().fullscreen&&jQuery.isFunction(jQuery().fullscreen)&&jQuery.fullscreen.isFullScreen()&&jQuery.fullscreen.exit(),"undefined"!=typeof enable_addthis&&enable_addthis&&jQuery(".at4-share-outer").hide(),setTimeout(function(){jQuery(".spider_popup_wrap").remove(),jQuery(".bwg_spider_popup_loading").css({display:"none"}),jQuery(".spider_popup_overlay").css({display:"none"}),jQuery(document).off("keydown"),!1!==bwg_overflow_initial_value&&jQuery("html").css("overflow",bwg_overflow_initial_value),!1!==bwg_overflow_x_initial_value&&jQuery("html").css("overflow-x",bwg_overflow_x_initial_value),!1!==bwg_overflow_y_initial_value&&jQuery("html").css("overflow-y",bwg_overflow_y_initial_value)},20)),isPopUpOpened=!1;var t=/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase()),i=document.querySelector('meta[name="viewport"]');t&&i&&(i.content="width=device-width, initial-scale=1");var a=jQuery(document).scrollTop();bwg_objectsL10n.is_pro&&location.replace("#"),jQuery(document).scrollTop(a),void 0!==gallery_box_data.bwg_playInterval&&clearInterval(gallery_box_data.bwg_playInterval)}function get_ajax_pricelist(){var e={};return jQuery(".add_to_cart_msg").html(""),e.ajax_task="display",e.image_id=jQuery("#bwg_popup_image").attr("image_id"),jQuery("#ecommerce_ajax_loading").css("height",jQuery(".bwg_ecommerce_panel").css("height")),jQuery("#ecommerce_opacity_div").css("width",jQuery(".bwg_ecommerce_panel").css("width")),jQuery("#ecommerce_opacity_div").css("height",jQuery(".bwg_ecommerce_panel").css("height")),jQuery("#ecommerce_loading_div").css("width",jQuery(".bwg_ecommerce_panel").css("width")),jQuery("#ecommerce_loading_div").css("height",jQuery(".bwg_ecommerce_panel").css("height")),jQuery("#ecommerce_opacity_div").css("display","block"),jQuery("#ecommerce_loading_div").css("display","table-cell"),jQuery.ajax({type:"POST",url:jQuery("#bwg_ecommerce_form").attr("action"),data:e,success:function(e){jQuery(".pge_tabs li a").on("click",function(){return jQuery(".pge_tabs_container > div").hide(),jQuery(".pge_tabs li").removeClass("pge_active"),jQuery(jQuery(this).attr("href")).show(),jQuery(this).closest("li").addClass("pge_active"),jQuery("[name=type]").val(jQuery(this).attr("href").substr(1)),!1});var t=jQuery(e).find(".manual").html();jQuery(".manual").html(t);var i=jQuery(e).find(".downloads").html();jQuery(".downloads").html(i);var a=jQuery(e).find(".pge_options").html();jQuery(".pge_options").html(a);var r=jQuery(e).find(".pge_add_to_cart").html();jQuery(".pge_add_to_cart").html(r)},beforeSend:function(){},complete:function(){jQuery("#ecommerce_opacity_div").css("display","none"),jQuery("#ecommerce_loading_div").css("display","none")}}),!1}function spider_ajax_save(e){var t={};return t.bwg_name=jQuery("#bwg_name").val(),t.bwg_comment=jQuery("#bwg_comment").val(),t.bwg_email=jQuery("#bwg_email").val(),t.bwg_captcha_input=jQuery("#bwg_captcha_input").val(),t.ajax_task=jQuery("#ajax_task").val(),t.image_id=jQuery("#image_id").val(),t.comment_id=jQuery("#comment_id").val(),jQuery("#ajax_loading").css("height",jQuery(".bwg_comments").css("height")),jQuery("#opacity_div").css("width",jQuery(".bwg_comments").css("width")),jQuery("#opacity_div").css("height",jQuery(".bwg_comments").css("height")),jQuery("#loading_div").css("width",jQuery(".bwg_comments").css("width")),jQuery("#loading_div").css("height",jQuery(".bwg_comments").css("height")),document.getElementById("opacity_div").style.display="",document.getElementById("loading_div").style.display="table-cell",jQuery.ajax({type:"POST",url:jQuery("#"+e).attr("action"),data:t,success:function(e){var t=jQuery(e).find(".bwg_comments").html();jQuery(".bwg_comments").html(t)},beforeSend:function(){},complete:function(){document.getElementById("opacity_div").style.display="none",document.getElementById("loading_div").style.display="none",jQuery(".bwg_comments").mCustomScrollbar({scrollInertia:150,advanced:{updateOnContentResize:!0}}),jQuery(".bwg_comments_close_btn").click(bwg_comment),bwg_captcha_refresh("bwg_captcha")}}),!1}function spider_rate_ajax_save(i){var e={};return e.image_id=jQuery("#"+i+" input[name='image_id']").val(),e.rate=jQuery("#"+i+" input[name='score']").val(),e.ajax_task=jQuery("#rate_ajax_task").val(),jQuery.ajax({type:"POST",url:jQuery("#"+i).attr("action"),data:e,success:function(e){var t=jQuery(e).find("#"+i).html();jQuery("#"+i).html(t)},beforeSend:function(){},complete:function(){}})}function spider_set_input_value(e,t){document.getElementById(e)&&(document.getElementById(e).value=t)}function spider_form_submit(e,t){document.getElementById(t)&&document.getElementById(t).submit(),e.preventDefault?e.preventDefault():e.returnValue=!1}function spider_check_required(e,t){return""==jQuery("#"+e).val()&&(alert(t+" "+bwg_objectsL10n.bwg_field_required),jQuery("#"+e).attr("style","border-color: #FF0000;"),jQuery("#"+e).focus(),!0)}function comment_check_privacy_policy(){var e=jQuery("#bwg_submit");e.removeClass("bwg-submit-disabled"),e.removeAttr("disabled"),jQuery("#bwg_comment_privacy_policy").is(":checked")||(e.addClass("bwg-submit-disabled"),e.attr("disabled","disabled"))}function spider_check_email(e){if(""!=jQuery("#"+e).val())return-1==jQuery("#"+e).val().replace(/^\s+|\s+$/g,"").search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/)&&(alert(bwg_objectsL10n.bwg_mail_validation),!0)}function bwg_captcha_refresh(e){document.getElementById(e+"_img")&&document.getElementById(e+"_input")&&(srcArr=document.getElementById(e+"_img").src.split("&r="),document.getElementById(e+"_img").src=srcArr[0]+"&r="+Math.floor(100*Math.random()),document.getElementById(e+"_img").style.display="inline-block",document.getElementById(e+"_input").value="")}function bwg_play_instagram_video(e,t){jQuery(e).parent().find("video").each(function(){jQuery(this).get(0).paused?(jQuery(this).get(0).play(),jQuery(e).children().hide()):(jQuery(this).get(0).pause(),jQuery(e).children().show())})}function bwg_add_comment(){var t=jQuery("#bwg_comment_form"),e=t.attr("action"),i={ajax_task:"add_comment"};return i.comment_name=t.find("#bwg_name").val(),i.comment_email=t.find("#bwg_email").val(),i.comment_text=t.find("#bwg_comment").val(),i.comment_captcha=t.find("#bwg_captcha_input").val(),i.popup_enable_captcha=t.find("#bwg_popup_enable_captcha").val(),i.privacy_policy=t.find("#bwg_comment_privacy_policy").is(":checked")?1:0,i.comment_image_id=jQuery("#bwg_popup_image").attr("image_id"),i.comment_moderation=t.find("#bwg_comment_moderation").val(),jQuery(".bwg_spider_ajax_loading").hide(),jQuery.ajax({url:e,type:"POST",dataType:"json",data:i,success:function(e){jQuery(".bwg_comment_error").text(""),1==e.error?jQuery.each(e.error_messages,function(e,t){t&&jQuery(".bwg_comment_"+e+"_error").text(t)}):(t.find("#bwg_comment").val(""),jQuery(".bwg_comment_waiting_message").hide(),0==e.published&&jQuery(".bwg_comment_waiting_message").show(),""!=e.html_comments_block&&jQuery("#bwg_added_comments").html(e.html_comments_block).show())},beforeSend:function(){jQuery(".bwg_spider_ajax_loading").show()},complete:function(){0jQuery(".bwg_image_info").height()&&jQuery(".mCSB_container").hasClass("mCS_no_scrollbar")&&jQuery(".bwg_image_info").mCustomScrollbar("destroy"),jQuery(".bwg_image_info").hasClass("mCustomScrollbar")||void 0!==jQuery().mCustomScrollbar&&jQuery.isFunction(jQuery().mCustomScrollbar)&&jQuery(".bwg_image_info").mCustomScrollbar({scrollInertia:150,advanced:{updateOnContentResize:!0}})},200),jQuery("#spider_popup_left").show(),jQuery("#spider_popup_right").show(),jQuery(".bwg_image_info").hide(),0==gallery_box_data.enable_loop&&(a==parseInt(r.length)-1&&jQuery("#spider_popup_right").hide(),0==a&&jQuery("#spider_popup_left").hide()),1==gallery_box_data.ecommerceACtive&&1==gallery_box_data.enable_image_ecommerce)if(0==gallery_box_data.data[a].pricelist)jQuery(".bwg_ecommerce").hide();else{jQuery(".bwg_ecommerce").show(),jQuery(".pge_tabs li").hide(),jQuery("#downloads").hide(),jQuery("#manual").hide();var i=gallery_box_data.data[a].pricelist_sections.split(",");if(i)if(jQuery("#"+i[0]).show(),jQuery("[name=type]").val(i[0]),1a)_="left";else if(bwg_current_key==a)return;jQuery(".bwg_image_count").html(r[a].number),jQuery(".bwg_watermark").css({display:"none"}),"width"==gallery_box_data.width_or_height?bwg_current_filmstrip_pos=a*(jQuery(".bwg_filmstrip_thumbnail").width()+2+2*gallery_box_data.lightbox_filmstrip_thumb_border_width):"height"==gallery_box_data.width_or_height&&(bwg_current_filmstrip_pos=a*(jQuery(".bwg_filmstrip_thumbnail").height()+2+2*gallery_box_data.lightbox_filmstrip_thumb_border_width)),gallery_box_data.bwg_current_key=a,bwg_objectsL10n.is_pro&&(location.replace("#bwg"+gallery_box_data.gallery_id+"/"+r[a].id),history.replaceState(void 0,void 0,"#bwg"+gallery_box_data.gallery_id+"/"+r[a].id)),jQuery("#bwg_rate_form input[name='image_id']").val(r[a].id),gallery_box_data.popup_enable_rate&&(jQuery("#bwg_star").attr("data-score",r[a].avg_rating),jQuery("#bwg_star").removeAttr("title"),r[a].cur_key=a,bwg_rating(r[a].rate,r[a].rate_count,r[a].avg_rating,a)),spider_set_input_value("rate_ajax_task","save_hit_count"),spider_rate_ajax_save("bwg_rate_form"),jQuery(".bwg_image_hits span").html(++r[a].hit_count),jQuery("#bwg_popup_image").attr("image_id",r[a].id),jQuery(".bwg_image_title").html(jQuery("").html(r[a].alt).text()),jQuery(".bwg_image_description").html(jQuery("").html(r[a].description).text()),jQuery(".bwg_filmstrip_thumbnail").removeClass("bwg_thumb_active").addClass("bwg_thumb_deactive"),jQuery("#bwg_filmstrip_thumbnail_"+a).removeClass("bwg_thumb_deactive").addClass("bwg_thumb_active"),jQuery(".bwg_image_info").css("opacity",1),""==r[a].alt.trim()&&""==r[a].description.trim()&&jQuery(".bwg_image_info").css("opacity",0),"none"!=jQuery(".bwg_image_info_container1").css("display")?jQuery(".bwg_image_info_container1").css("display","table-cell"):jQuery(".bwg_image_info_container1").css("display","none"),"none"!=jQuery(".bwg_image_rate_container1").css("display")?jQuery(".bwg_image_rate_container1").css("display","table-cell"):jQuery(".bwg_image_rate_container1").css("display","none");var s=2==jQuery(".bwg_popup_image_spun").css("zIndex")?".bwg_popup_image_spun":".bwg_popup_image_second_spun",o=".bwg_popup_image_second_spun"==s?".bwg_popup_image_spun":".bwg_popup_image_second_spun",l=-1';if(l){if(jQuery("#bwg_download").addClass("bwg-hidden"),d+=''+(g?'
':" "),n){var h=0,m=0;b").html(decodeURIComponent(r[a].image_url)).text()+'" alt="'+r[a].alt+'" />';function p(){gallery_box_data.preload_images&&bwg_preload_images(a),window["bwg_"+gallery_box_data.bwg_image_effect](s,o,_),jQuery(s).find(".bwg_fb_video").each(function(){jQuery(this).attr("src","")}),l?jQuery("#bwg_fullsize_image").attr("href",decodeURIComponent(r[a].image_url)):(jQuery("#bwg_fullsize_image").attr("href",gallery_box_data.site_url+decodeURIComponent(r[a].image_url)),jQuery("#bwg_download").attr("href",gallery_box_data.site_url+decodeURIComponent(r[a].thumb_url).replace("/thumb/","/.original/")));var e=decodeURIComponent(r[a].image_url).split("/");jQuery("#bwg_download").attr("download",e[e.length-1].replace(/\?bwg=(\d+)$/,""));var t=encodeURIComponent(gallery_box_data.bwg_share_url)+"="+r[a].id+encodeURIComponent("#bwg"+gallery_box_data.gallery_id+"/")+r[a].id;if(l)var i=encodeURIComponent(r[a].thumb_url);else i=gallery_box_data.bwg_share_image_url+encodeURIComponent(encodeURIComponent(r[a].pure_image_url));i=i.replace(/%252F|%25252F/g,"%2F"),void 0!==addthis_share&&(addthis_share.url=t),jQuery("#bwg_facebook_a").attr("href","https://www.facebook.com/sharer/sharer.php?u="+t),jQuery("#bwg_twitter_a").attr("href","https://twitter.com/share?url="+t),jQuery("#bwg_pinterest_a").attr("href","http://pinterest.com/pin/create/button/?s=100&url="+t+"&media="+i+"&description="+r[a].alt+"%0A"+r[a].description),jQuery("#bwg_tumblr_a").attr("href","https://www.tumblr.com/share/photo?source="+i+"&caption="+r[a].alt+"&clickthru="+t),jQuery(".bwg_comment_container").hasClass("bwg_open")&&(jQuery(".bwg_comments .mCSB_container").css("top","0"),jQuery("#bwg_added_comments").show(),spider_set_input_value("ajax_task","display"),spider_set_input_value("image_id",jQuery("#bwg_popup_image").attr("image_id")),spider_ajax_save("bwg_comment_form")),jQuery(".bwg_ecommerce_container").hasClass("bwg_open")&&(0==r[a].pricelist?(bwg_popup_sidebar_close(jQuery(".bwg_ecommerce_container")),bwg_animate_image_box_for_hide_sidebar(),jQuery(".bwg_ecommerce_container").attr("class","bwg_ecommerce_container bwg_close"),jQuery(".bwg_ecommerce").attr("title",bwg_objectsL10n.bwg_show_ecommerce),jQuery(".spider_popup_close_fullscreen").show()):get_ajax_pricelist()),void 0!==jQuery().mCustomScrollbar&&jQuery.isFunction(jQuery().mCustomScrollbar)&&jQuery(".bwg_comments").mCustomScrollbar({advanced:{updateOnContentResize:!0}}),jQuery(".bwg_comments .mCSB_scrollTools").hide(),gallery_box_data.enable_image_filmstrip&&bwg_move_filmstrip(),bwg_resize_instagram_post()}if(d+="
",jQuery(o).html(d),jQuery(o).find("img").on("load error",function(){jQuery(".bwg-loading").addClass("bwg-hidden")}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").css({maxWidth:u,maxHeight:b,height:"auto"}),l)p();else jQuery(o).find("img").one("load",function(){p()}).each(function(){this.complete&&jQuery(this).load()});"undefined"!=typeof instgrm&&void 0!==instgrm.Embeds&&instgrm.Embeds.process()}}function bwg_preload_images_lightbox(e){for(var t=gallery_box_data.data,i=t.length,a=0==gallery_box_data.preload_images_count||gallery_box_data.preload_images_count>=i?i:gallery_box_data.preload_images_count,r=0,_=1;r").attr("src",gallery_box_data.site_url+jQuery("").html(decodeURIComponent(t[o].image_url)).text());s*=-1,r++}while(1!=s)}}function bwg_popup_sidebar_open(e){var t=gallery_box_data.lightbox_comment_width,i=gallery_box_data.lightbox_comment_pos;if(t>jQuery(window).width()){if(t=jQuery(window).width(),e.css({width:t}),jQuery(".spider_popup_close_fullscreen").hide(),jQuery(".spider_popup_close").hide(),jQuery(".bwg_ctrl_btn").hasClass("bwg-icon-pause")){var a=/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase());jQuery(".bwg_play_pause").trigger(a?"touchend":"click")}}else jQuery(".spider_popup_close_fullscreen").show();"left"==i?e.animate({left:0},100):e.animate({right:0},100)}function bwg_comment(){if(jQuery(".bwg_watermark").css({display:"none"}),jQuery(".bwg_ecommerce_wrap").css("z-index","-1"),jQuery(".bwg_comment_wrap").css("z-index","25"),jQuery(".bwg_ecommerce_container").hasClass("bwg_open")&&(bwg_popup_sidebar_close(jQuery(".bwg_ecommerce_container")),jQuery(".bwg_ecommerce_container").attr("class","bwg_ecommerce_container bwg_close"),jQuery(".bwg_ecommerce").attr("title",bwg_objectsL10n.bwg_show_ecommerce)),jQuery(".bwg_comment_container").hasClass("bwg_open"))"1"==jQuery(".bwg_comment_container").attr("data-play-status")&&jQuery(".bwg_ctrl_btn.bwg_play_pause").removeClass("bwg-icon-play").addClass("bwg-icon-pause").attr("title",bwg_objectsL10n.bwg_pause),bwg_popup_sidebar_close(jQuery(".bwg_comment_container")),bwg_animate_image_box_for_hide_sidebar(),jQuery(".bwg_comment_wrap").css("z-index","-1"),jQuery(".bwg_comment_container").attr("class","bwg_comment_container bwg_close"),jQuery(".bwg_comment").attr("title",bwg_objectsL10n.bwg_show_comments),jQuery(".spider_popup_close_fullscreen").show();else{jQuery(".bwg_play_pause").hasClass("bwg-icon-pause")?jQuery(".bwg_comment_container").attr("data-play-status","1"):jQuery(".bwg_comment_container").attr("data-play-status","0"),jQuery(".bwg_ctrl_btn.bwg_play_pause").removeClass("bwg-icon-pause").addClass("bwg-icon-play").attr("title",bwg_objectsL10n.bwg_play),bwg_popup_sidebar_open(jQuery(".bwg_comment_container")),bwg_animate_image_box_for_show_sidebar(),jQuery(".bwg_comment_container").attr("class","bwg_comment_container bwg_open"),jQuery(".bwg_comment").attr("title",bwg_objectsL10n.bwg_hide_comments);var e=parseInt(jQuery("#bwg_current_image_key").val());void 0!==gallery_box_data.current_image_key&&0!=gallery_box_data.data[e].comment_count&&(jQuery("#bwg_added_comments").show(),spider_set_input_value("ajax_task","display"),spider_set_input_value("image_id",jQuery("#bwg_popup_image").attr("image_id")),spider_ajax_save("bwg_comment_form"))}jQuery(".bwg_comments").mCustomScrollbar("update",{scrollInertia:150,advanced:{updateOnContentResize:!0}})}function bwg_ecommerce(){jQuery(".bwg_watermark").css({display:"none"}),jQuery(".bwg_ecommerce_wrap").css("z-index","25"),jQuery(".bwg_comment_wrap").css("z-index","-1"),jQuery(".bwg_comment_container").hasClass("bwg_open")&&(bwg_popup_sidebar_close(jQuery(".bwg_comment_container")),jQuery(".bwg_comment_container").attr("class","bwg_comment_container bwg_close"),jQuery(".bwg_comment").attr("title",bwg_objectsL10n.bwg_show_comments)),jQuery(".bwg_ecommerce_container").hasClass("bwg_open")?(bwg_popup_sidebar_close(jQuery(".bwg_ecommerce_container")),bwg_animate_image_box_for_hide_sidebar(),jQuery(".bwg_ecommerce_container").attr("class","bwg_ecommerce_container bwg_close"),jQuery(".bwg_ecommerce").attr("title",bwg_objectsL10n.bwg_show_ecommerce)):(bwg_popup_sidebar_open(jQuery(".bwg_ecommerce_container")),bwg_animate_image_box_for_show_sidebar(),jQuery(".bwg_ecommerce_container").attr("class","bwg_ecommerce_container bwg_open"),jQuery(".bwg_ecommerce").attr("title",bwg_objectsL10n.bwg_hide_ecommerce),get_ajax_pricelist())}function bwg_popup_sidebar_close(e){var t=parseInt(e.css("borderRightWidth"));t||(t=0),"left"==lightbox_comment_pos?e.animate({left:-e.width()-t},100):"right"==lightbox_comment_pos&&e.animate({right:-e.width()-t},100)}function bwg_animate_image_box_for_hide_sidebar(){"left"==lightbox_comment_pos?jQuery(".bwg_image_wrap").animate({left:0,width:jQuery("#spider_popup_wrap").width()},100):"right"==lightbox_comment_pos&&jQuery(".bwg_image_wrap").animate({right:0,width:jQuery("#spider_popup_wrap").width()},100),jQuery(".bwg_image_container").animate({width:jQuery("#spider_popup_wrap").width()-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)},100),jQuery(".bwg_popup_image").animate({maxWidth:jQuery("#spider_popup_wrap").width()-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)},{duration:100,complete:function(){bwg_change_watermark_container()}}),jQuery(".bwg_popup_embed").animate({width:jQuery("#spider_popup_wrap").width()-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)},{duration:100,complete:function(){bwg_resize_instagram_post(),bwg_change_watermark_container()}}),"width"==gallery_box_data.width_or_height?(jQuery(".bwg_filmstrip_container").animate({width:jQuery(".spider_popup_wrap").width()},100),jQuery(".bwg_filmstrip").animate({width:jQuery(".spider_popup_wrap").width()-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())},100)):"height"==gallery_box_data.width_or_height&&(jQuery(".bwg_filmstrip_container").animate({height:jQuery(".spider_popup_wrap").width()},100),jQuery(".bwg_filmstrip").animate({height:jQuery(".spider_popup_wrap").width()-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())},100)),bwg_set_filmstrip_pos(jQuery(".spider_popup_wrap").width()-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data),jQuery(".spider_popup_close_fullscreen").show(100)}function bwg_animate_image_box_for_show_sidebar(){var e=jQuery(".bwg_comment_container").width()||jQuery(".bwg_ecommerce_container").width();"left"==lightbox_comment_pos?jQuery(".bwg_image_wrap").animate({left:e,width:jQuery("#spider_popup_wrap").width()-e},100):"right"==lightbox_comment_pos&&jQuery(".bwg_image_wrap").animate({right:e,width:jQuery("#spider_popup_wrap").width()-e},100),jQuery(".bwg_image_container").animate({width:jQuery("#spider_popup_wrap").width()-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)-e},100),jQuery(".bwg_popup_image").animate({maxWidth:jQuery("#spider_popup_wrap").width()-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)},{duration:100,complete:function(){bwg_change_watermark_container()}}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").animate({maxWidth:jQuery("#spider_popup_wrap").width()-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)},{duration:100,complete:function(){bwg_resize_instagram_post(),bwg_change_watermark_container()}}),"width"==gallery_box_data.width_or_height&&(jQuery(".bwg_filmstrip_container").css({width:jQuery("#spider_popup_wrap").width()-("vertical"==gallery_box_data.filmstrip_direction?0:e)}),jQuery(".bwg_filmstrip").animate({width:jQuery(".bwg_filmstrip_container").width()-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())},100),bwg_set_filmstrip_pos(jQuery(".bwg_filmstrip_container").width()-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data))}function bwg_reset_zoom(){var e=/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase()),t=document.querySelector('meta[name="viewport"]');e&&t&&(t.content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=0")}function bwg_open_with_fullscreen(){jQuery(".bwg_watermark").css({display:"none"});var e=0;(jQuery(".bwg_comment_container").hasClass("bwg_open")||jQuery(".bwg_ecommerce_container").hasClass("bwg_open"))&&(e=jQuery(".bwg_comment_container").width()||jQuery(".bwg_ecommerce_container").width()),bwg_popup_current_width=jQuery(window).width(),bwg_popup_current_height=window.innerHeight,jQuery("#spider_popup_wrap").css({width:jQuery(window).width(),height:window.innerHeight,left:0,top:0,margin:0,zIndex:100002}),jQuery(".bwg_image_wrap").css({width:jQuery(window).width()-e}),jQuery(".bwg_image_container").css({height:bwg_popup_current_height-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0),width:bwg_popup_current_width-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)}),jQuery(".bwg_popup_image").css({maxWidth:jQuery(window).width()-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)},{complete:function(){bwg_change_watermark_container()}}),jQuery(".bwg_popup_video").css({width:jQuery(window).width()-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),height:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)},{complete:function(){bwg_change_watermark_container()}}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").css({maxWidth:jQuery(window).width()-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)},{complete:function(){bwg_resize_instagram_post(),bwg_change_watermark_container()}}),"width"==gallery_box_data.width_or_height?(jQuery(".bwg_filmstrip_container").css({width:jQuery(window).width()-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)}),jQuery(".bwg_filmstrip").css({width:jQuery(window).width()-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())}),bwg_set_filmstrip_pos(jQuery(window).width()-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data)):(jQuery(".bwg_filmstrip_container").css({height:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)}),jQuery(".bwg_filmstrip").css({height:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())}),bwg_set_filmstrip_pos(window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data)),jQuery(".bwg_resize-full").attr("class","bwg-icon-compress bwg_ctrl_btn bwg_resize-full"),jQuery(".bwg_resize-full").attr("title",bwg_objectsL10n.bwg_restore),jQuery(".spider_popup_close").attr("class","bwg_ctrl_btn spider_popup_close_fullscreen")}function bwg_resize_full(){jQuery(".bwg_watermark").css({display:"none"});var e=0;(jQuery(".bwg_comment_container").hasClass("bwg_open")||jQuery(".bwg_ecommerce_container").hasClass("bwg_open"))&&(e=jQuery(".bwg_comment_container").width()||jQuery(".bwg_ecommerce_container").width()),jQuery(".bwg_resize-full").hasClass("bwg-icon-compress")?(jQuery(window).width()>gallery_box_data.image_width&&(bwg_popup_current_width=gallery_box_data.image_width),window.innerHeight>gallery_box_data.image_height&&(bwg_popup_current_height=gallery_box_data.image_height),jQuery("#spider_popup_wrap").animate({width:bwg_popup_current_width,height:bwg_popup_current_height,left:"50%",top:"50%",marginLeft:-bwg_popup_current_width/2,marginTop:-bwg_popup_current_height/2,zIndex:100002},500),jQuery(".bwg_image_wrap").animate({width:bwg_popup_current_width-e},500),jQuery(".bwg_image_container").animate({height:bwg_popup_current_height-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0),width:bwg_popup_current_width-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)},500),jQuery(".bwg_popup_image").animate({maxWidth:bwg_popup_current_width-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:bwg_popup_current_height-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)},{duration:500,complete:function(){bwg_change_watermark_container(),jQuery("#spider_popup_wrap").width() .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").animate({maxWidth:bwg_popup_current_width-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:bwg_popup_current_height-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)},{duration:500,complete:function(){bwg_resize_instagram_post(),bwg_change_watermark_container(),jQuery("#spider_popup_wrap").width() .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").animate({maxWidth:jQuery(window).width()-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)},{duration:500,complete:function(){bwg_resize_instagram_post(),bwg_change_watermark_container()}}),"width"==gallery_box_data.width_or_height?(jQuery(".bwg_filmstrip_container").animate({width:jQuery(window).width()-("horizontal"==gallery_box_data.filmstrip_direction?e:0)},500),jQuery(".bwg_filmstrip").animate({width:jQuery(window).width()-("horizontal"==gallery_box_data.filmstrip_direction?e:0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())},500),bwg_set_filmstrip_pos(jQuery(window).width()-("horizontal"==gallery_box_data.filmstrip_direction?e:0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data)):(jQuery(".bwg_filmstrip_container").animate({height:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?e:0)},500),jQuery(".bwg_filmstrip").animate({height:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?e:0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())},500),bwg_set_filmstrip_pos(window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?e:0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data),"horizontal"!=gallery_box_data.filmstrip_direction&&jQuery(".bwg_filmstrip_right").css({top:window.innerHeight-jQuery(".bwg_filmstrip_right").height()})),jQuery(".bwg_resize-full").attr("class","bwg-icon-compress bwg_ctrl_btn bwg_resize-full"),jQuery(".bwg_resize-full").attr("title",bwg_objectsL10n.bwg_restore),jQuery(".spider_popup_close").attr("class","bwg_ctrl_btn spider_popup_close_fullscreen")),setTimeout(function(){bwg_info_height_set()},500)}function bwg_popup_resize_lightbox(){void 0!==jQuery().fullscreen&&jQuery.isFunction(jQuery().fullscreen)&&(jQuery.fullscreen.isFullScreen()||(jQuery(".bwg_resize-full").show(),jQuery(".bwg_resize-full").hasClass("bwg-icon-compress")||jQuery(".bwg_resize-full").attr("class","bwg-icon-expand bwg_ctrl_btn bwg_resize-full"),jQuery(".bwg_resize-full").attr("title",bwg_objectsL10n.bwg_maximize),jQuery(".bwg_fullscreen").attr("class","bwg-icon-arrows-out bwg_ctrl_btn bwg_fullscreen"),jQuery(".bwg_fullscreen").attr("title",bwg_objectsL10n.fullscreen)));var e=0;(jQuery(".bwg_comment_container").hasClass("bwg_open")||jQuery(".bwg_ecommerce_container").hasClass("bwg_open"))&&(e=gallery_box_data.lightbox_comment_width),e>jQuery(window).width()?(e=jQuery(window).width(),jQuery(".bwg_comment_container").css({width:e}),jQuery(".bwg_ecommerce_container").css({width:e}),jQuery(".spider_popup_close_fullscreen").hide()):jQuery(".spider_popup_close_fullscreen").show(),window.innerHeight>gallery_box_data.image_height&&1!=gallery_box_data.open_with_fullscreen&&!jQuery(".bwg_resize-full").hasClass("bwg-icon-compress")?(jQuery("#spider_popup_wrap").css({height:gallery_box_data.image_height,top:"50%",marginTop:-gallery_box_data.image_height/2,zIndex:100002}),jQuery(".bwg_image_container").css({height:gallery_box_data.image_height-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),jQuery(".bwg_image_info").css("height","auto"),bwg_info_height_set(),jQuery(".bwg_popup_image").css({maxHeight:gallery_box_data.image_height-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").css({maxHeight:gallery_box_data.image_height-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),"vertical"==gallery_box_data.filmstrip_direction&&(jQuery(".bwg_filmstrip_container").css({height:gallery_box_data.image_height}),jQuery(".bwg_filmstrip").css({height:gallery_box_data.image_height-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())})),bwg_popup_current_height=gallery_box_data.image_height):(jQuery("#spider_popup_wrap").css({height:window.innerHeight,top:0,marginTop:0,zIndex:100002}),jQuery(".bwg_image_container").css({height:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),jQuery(".bwg_image_info").css("height","auto"),bwg_info_height_set(),jQuery(".bwg_popup_image").css({maxHeight:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").css({maxHeight:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),"vertical"==gallery_box_data.filmstrip_direction&&(jQuery(".bwg_filmstrip_container").css({height:window.innerHeight}),jQuery(".bwg_filmstrip").css({height:window.innerHeight-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())})),bwg_popup_current_height=window.innerHeight),jQuery(window).width()>=gallery_box_data.image_width&&1!=gallery_box_data.open_with_fullscreen?(jQuery("#spider_popup_wrap").css({width:gallery_box_data.image_width,left:"50%",marginLeft:-gallery_box_data.image_width/2,zIndex:100002}),jQuery(".bwg_image_wrap").css({width:gallery_box_data.image_width-e}),jQuery(".bwg_image_container").css({width:gallery_box_data.image_width-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)-e}),jQuery(".bwg_image_info").css("height","auto"),bwg_info_height_set(),jQuery(".bwg_popup_image").css({maxWidth:gallery_box_data.image_width-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)-e}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").css({maxWidth:gallery_box_data.image_width-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)-e}),"horizontal"==gallery_box_data.filmstrip_direction&&(jQuery(".bwg_filmstrip_container").css({width:gallery_box_data.image_width-e}),jQuery(".bwg_filmstrip").css({width:gallery_box_data.image_width-e-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())})),bwg_popup_current_width=gallery_box_data.image_width):(jQuery("#spider_popup_wrap").css({width:jQuery(window).width(),left:0,marginLeft:0,zIndex:100002}),jQuery(".bwg_image_wrap").css({width:jQuery(window).width()-e}),jQuery(".bwg_image_container").css({width:jQuery(window).width()-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)-e}),jQuery(".bwg_popup_image").css({maxWidth:jQuery(window).width()-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)-e}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").css({maxWidth:jQuery(window).width()-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)-e}),"horizontal"==gallery_box_data.filmstrip_direction&&(jQuery(".bwg_filmstrip_container").css({width:jQuery(window).width()-e}),jQuery(".bwg_filmstrip").css({width:jQuery(window).width()-e-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())})),bwg_popup_current_width=jQuery(window).width()),bwg_resize_instagram_post(),bwg_change_watermark_container(),window.innerHeight>gallery_box_data.image_height-2*gallery_box_data.lightbox_close_btn_top&&jQuery(window).width()>=gallery_box_data.image_width-2*gallery_box_data.lightbox_close_btn_right&&1!=gallery_box_data.open_with_fullscreen?jQuery(".spider_popup_close_fullscreen").attr("class","spider_popup_close"):jQuery("#spider_popup_wrap").width()checkout_page);?>")},beforeSend:function(){},complete:function(){}})}else jQuery(".add_to_cart_msg").html("Please select Prints and products or Downloads")}function onBtnViewCart(){var e=jQuery("[name=option_checkout_page]").val();jQuery("#bwg_ecommerce_form").attr("action",e),jQuery("#bwg_ecommerce_form").submit()}function bwg_load_visible_images(e,t,i){0<=e-t&&(startPoint=e-t),i";break;case"EMBED_OEMBED_VIMEO_VIDEO":var s="";break;case"EMBED_OEMBED_FLICKR_IMAGE":var o="
'),r+=o+="
";break;case"EMBED_OEMBED_FLICKR_VIDEO":break;case"EMBED_OEMBED_INSTAGRAM_VIDEO":var l="
Your browser does not support the video tag. '),r+=l+="
";break;case"EMBED_OEMBED_INSTAGRAM_IMAGE":l="
'),r+=l+="
";break;case"EMBED_OEMBED_INSTAGRAM_POST":l="
",""!=t&&(l+='
'+atob(t)+"
"),r+=l+="
";break;case"EMBED_OEMBED_FACEBOOK_IMAGE":var n="'),r+=n+="";break;case"EMBED_OEMBED_FACEBOOK_VIDEO":var g="
'),r+=g+="
";break;case"EMBED_OEMBED_DAILYMOTION_VIDEO":var w="";break;case"EMBED_OEMBED_IMGUR":var b="
'),r+=b+="
";break;case"EMBED_OEMBED_GOOGLE_PHOTO_IMAGE":var u="
'),r+=u+="
";break;default:var d={content:""};jQuery(document).trigger("bwg_display_embed",[d,e,t,i,a]),r=d.content}return r}function bwg_add_instagram_gallery(e,s){if(!0===(s=void 0!==s&&s)){if(bwg_check_instagram_gallery_input(e,s))return!1;var t="0";1==jQuery("input[name=popup_instagram_post_gallery]:checked").val()&&(t="1");var i=encodeURI(jQuery("#popup_instagram_gallery_source").val()),a=encodeURI(jQuery("#popup_instagram_image_number").val())}else{if(bwg_check_instagram_gallery_input(e,s))return!1;if(!bwg_check_gallery_empty(!1,!0))return!1;t="0";1==jQuery("input[name=instagram_post_gallery]:checked").val()&&(t="1");i=encodeURI(jQuery("#gallery_source").val());var r=jQuery("input[name=update_flag]:checked").val();a=encodeURI(jQuery("#autogallery_image_number").val())}jQuery("#bulk_embed").hide(),jQuery("#loading_div").show();var o=[],_={action:"addInstagramGallery",instagram_user:i,instagram_access_token:e,whole_post:t,autogallery_image_number:a,update_flag:r,async:!0};jQuery.post(ajax_url,_,function(e){if(0==e)return alert("Error: cannot get response from the server."),jQuery("#loading_div").hide(),s&&jQuery("#bulk_embed").show(),!1;var t=e.indexOf("WD_delimiter_start"),i=e.indexOf("WD_delimiter_end");if(-1==t||-1==i)return jQuery("#loading_div").hide(),s&&jQuery("#bulk_embed").show(),!1;if(e=e.substring(t+18,i),response_JSON=JSON.parse(e),response_JSON){if("error"==response_JSON[0])return alert("Error: "+JSON.parse(e)[1]),jQuery("#loading_div").hide(),s&&jQuery("#bulk_embed").show(),!1;for(var a=response_JSON.length,r=1;r<=a;r++)if(0!=response_JSON[a-r]){var _=response_JSON[a-r];o.push(_)}return bwg_add_image(o),s||(bwg_gallery_update_flag(),jQuery("#tr_instagram_gallery_add_button").hide()),jQuery("#loading_div").hide(),s&&jQuery(".opacity_bulk_embed").hide(),"ok"}return alert("There is some error. Cannot add Instagram gallery."),jQuery("#loading_div").hide(),s&&jQuery("#bulk_embed").show(),!1})}var bwg=0,isMobile=/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase()),bwg_click=isMobile?"touchend":"click",bwg_params=[],bwg_params_ib=[],bwg_params_carousel=[];function bwg_main_ready(){1==bwg_objectsL10n.lazy_load&&jQuery(function(){jQuery("img.bwg_lazyload").lazy({onFinishedAll:function(){jQuery(".lazy_loader").removeClass("lazy_loader")}})}),jQuery(".bwg_container").each(function(){0"==bwg_hash_array[0]&&bwg_gallery_box(bwg_hash_array[1]))})}function bwg_slideshow_focus(){jQuery(".bwg_slideshow").each(function(){bwg=jQuery(this).attr("data-bwg"),jQuery(".bwg_slideshow[data-bwg="+bwg+"]")[0].offsetHeight&&jQuery("#bwg_slideshow_image_container_"+bwg).length&&(bwg_params[bwg]=JSON.parse(jQuery("#bwg_slideshow_image_container_"+bwg).attr("data-params")),bwg_params[bwg].event_stack=[],window.clearInterval(window["bwg_playInterval"+bwg]),jQuery(".bwg_ctrl_btn_"+bwg).hasClass("bwg-icon-play")||bwg_play(bwg_params[bwg].data,bwg))})}function bwg_slideshow_blur(e){jQuery(".bwg_slideshow").each(function(){bwg=jQuery(this).attr("data-bwg"),!e&&jQuery(".bwg_slideshow[data-bwg="+bwg+"]")[0].offsetHeight||jQuery("#bwg_slideshow_image_container_"+bwg).length&&(bwg_params[bwg]=JSON.parse(jQuery("#bwg_slideshow_image_container_"+bwg).attr("data-params")),bwg_params[bwg].event_stack=[],window.clearInterval(window["bwg_playInterval"+bwg]))})}function bwg_carousel_ready(){jQuery(".bwg-carousel").each(function(){var t=jQuery(this).data("bwg");bwg_params_carousel[t]=[],bwg_params_carousel[t].bwg_currentCenterNum=1,bwg_params_carousel[t].bwg_currentlyMoving=!1,bwg_params_carousel[t].data=[],jQuery("#spider_carousel_left-ico_"+t).on("click",function(e){bwg_params_carousel[t].carousel.prev(),e.stopPropagation(),e.stopImmediatePropagation()}),jQuery("#spider_carousel_right-ico_"+t).on("click",function(e){bwg_params_carousel[t].carousel.next(),e.stopPropagation(),e.stopImmediatePropagation()}),parseInt(bwg_params_carousel[t].carousel_enable_autoplay)&&(jQuery(".bwg_carousel_play_pause_"+t).attr("title",bwg_objectsL10n.pause),jQuery(".bwg_carousel_play_pause_"+t).attr("class","bwg-icon-pause bwg_ctrl_btn_"+t+" bwg_carousel_play_pause_"+t)),jQuery(".bwg_carousel_play_pause_"+t).on(bwg_click,function(e){jQuery(".bwg_ctrl_btn_"+t).hasClass("bwg-icon-play")?(jQuery(".bwg_carousel_play_pause_"+t).attr("title",bwg_objectsL10n.pause),jQuery(".bwg_carousel_play_pause_"+t).attr("class","bwg-icon-pause bwg_ctrl_btn_"+t+" bwg_carousel_play_pause_"+t),bwg_params_carousel[t].carousel.start()):(jQuery(".bwg_carousel_play_pause_"+t).attr("title",bwg_objectsL10n.play),jQuery(".bwg_carousel_play_pause_"+t).attr("class","bwg-icon-play bwg_ctrl_btn_"+t+" bwg_carousel_play_pause_"+t),bwg_params_carousel[t].carousel.pause()),e.stopPropagation(),e.stopImmediatePropagation()}),void 0!==jQuery().swiperight&&jQuery.isFunction(jQuery().swiperight)&&jQuery("#bwg_container1_"+t).swiperight(function(){bwg_params_carousel[t].carousel.prev()}),void 0!==jQuery().swipeleft&&jQuery.isFunction(jQuery().swipeleft)&&jQuery("#bwg_container1_"+t).swipeleft(function(){bwg_params_carousel[t].carousel.next()})})}function bwg_carousel_resize(){jQuery(".bwg-carousel").each(function(){var e=jQuery(this).data("bwg");bwg_carousel_params(e,!0),bwg_params_carousel[e].carousel.pause(),bwg_carousel_watermark(e),jQuery(".bwg_ctrl_btn_"+e).hasClass("bwg-icon-play")||bwg_params_carousel[e].carousel.start()})}function bwg_carousel_onload(){jQuery(".bwg-carousel").each(function(){var e=jQuery(this).data("bwg");bwg_params_carousel[e]=jQuery(this).data("params"),bwg_params_carousel[e].parent_width=0,bwg_carousel_watermark(e),bwg_carousel_params(e,!1),bwg_container_loaded(e)})}function bwg_carousel_params(t,e){var i=jQuery("#bwg_container1_"+t).parent();i.hasClass("elementor-tab-content")&&i.width(i.closest(".elementor-widget-wrap").width());var a=i.width(),r=1;abwg_params_carousel[t].count&&(bwg_params_carousel[t].carousel_image_column_number=bwg_params_carousel[t].count),jQuery(".bwg_carousel_play_pause_"+t).css({display:parseInt(bwg_params_carousel[t].carousel_play_pause_butt)?"":"none"}),parseInt(bwg_params_carousel[t].carousel_prev_next_butt)?(jQuery("#bwg_carousel-right"+t).css({display:""}),jQuery("#bwg_carousel-left"+t).css({display:""})):(jQuery("#bwg_carousel-left"+t).css({display:"none"}),jQuery("#bwg_carousel-right"+t).css({display:"none"})),jQuery(".inner_instagram_iframe_bwg_embed_frame_"+t).each(function(){var e=jQuery(this).parent();bwg_params_carousel[t].image_height/(parseInt(e.attr("data-height"))+96)=bwg_params_carousel[e].image_width)bwg_carousel_change_watermark_container(e),jQuery("#bwg_carousel_play_pause-ico_"+e).css({fontSize:bwg_params_carousel[e].carousel_play_pause_btn_size}),jQuery(".bwg_carousel_watermark_image_"+e).css({maxWidth:bwg_params_carousel[e].watermark_width*t,maxHeight:bwg_params_carousel[e].watermark_height*t}),jQuery(".bwg_carousel_watermark_text_"+e+", .bwg_carousel_watermark_text_"+e+":hover").css({fontSize:t*bwg_params_carousel[e].watermark_font_size});else{var a=bwg_params_carousel[e].image_width/t;bwg_carousel_change_watermark_container(e),jQuery("#bwg_carousel_play_pause-ico_"+e).css({fontSize:i*bwg_params_carousel[e].carousel_play_pause_btn_size/a}),jQuery(".bwg_carousel_watermark_image_"+e).css({maxWidth:i*bwg_params_carousel[e].watermark_width/a,maxHeight:i*bwg_params_carousel[e].watermark_height/a}),jQuery(".bwg_carousel_watermark_text_"+e+", .bwg_carousel_watermark_text_"+e+":hover").css({fontSize:i*bwg_params_carousel[e].watermark_font_size/a})}}function bwg_carousel_change_watermark_container(a){jQuery(".bwg_carousel"+a).children().each(function(){if(2==jQuery(this).css("zIndex")){var e=jQuery(this).find("img");e.length||(e=jQuery(this).find("iframe"));var t=e.width(),i=e.height();jQuery(".bwg_carousel_watermark_spun_"+a).width(t),jQuery(".bwg_carousel_watermark_spun_"+a).height(i),jQuery(".bwg_carousel_title_spun_"+a).width(t),jQuery(".bwg_carouel_title_spun_"+a).height(i),jQuery(".bwg_carousel_watermark_"+a).css({display:"none"})}})}function bwg_carousel_preload(e,t){var i=jQuery(".bwg_carousel_preload").get();t||i.reverse();var a=0;jQuery(i).each(function(){if(1<++a)return!1;jQuery(this).parent().hasClass("bwg_carousel_embed_video_"+e)||jQuery(this).parent().hasClass("bwg_embed_frame_"+e)||jQuery(this).parent().hasClass("bwg_carousel_video")?(jQuery(this).attr("src",jQuery(this).attr("data-src")),jQuery(this).on("load",function(){jQuery(this).removeClass("bwg_carousel_preload")}),jQuery(this).parent().hasClass("bwg_carousel_video")&&(jQuery(".bwg_carousel_video")[0].load(),jQuery(this).parent().parent().removeClass("bwg_carousel_preload")),jQuery(this).removeAttr("data-src")):(jQuery(this).css({"background-image":"url('"+jQuery(this).attr("data-background")+"')",height:"100%"}),jQuery(this).removeClass("bwg_carousel_preload"),jQuery(this).removeAttr("data-background"))})}function bwg_slideshow_ready(){jQuery(".bwg_slideshow").each(function(){var i=jQuery(this).data("bwg");if(jQuery("#bwg_slideshow_image_container_"+i).length){bwg_params[i]=JSON.parse(jQuery("#bwg_slideshow_image_container_"+i).attr("data-params")),bwg_params[i].event_stack=[],bwg_container_loaded(i);var e=bwg_params[i].data;void 0!==jQuery().swiperight&&jQuery.isFunction(jQuery().swiperight)&&jQuery("#bwg_container1_"+i).swiperight(function(){return bwg_change_image(parseInt(jQuery("#bwg_current_image_key_"+i).val()),0<=parseInt(jQuery("#bwg_current_image_key_"+i).val())-bwg_iterator(i)?(parseInt(jQuery("#bwg_current_image_key_"+i).val())-bwg_iterator(i))%e.length:e.length-1,e,"",i),!1}),void 0!==jQuery().swipeleft&&jQuery.isFunction(jQuery().swipeleft)&&jQuery("#bwg_container1_"+i).swipeleft(function(){return bwg_change_image(parseInt(jQuery("#bwg_current_image_key_"+i).val()),parseInt(jQuery("#bwg_current_image_key_"+i).val())+bwg_iterator(i)%e.length,e,"",i),!1});var t=/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase())?"touchend":"click";bwg_popup_resize(i),jQuery(".bwg_slideshow_watermark_"+i).css({display:"none"}),jQuery(".bwg_slideshow_title_text_"+i).css({display:"none"}),jQuery(".bwg_slideshow_description_text_"+i).css({display:"none"}),setTimeout(function(){bwg_change_watermark_container(i)},500),"horizontal"==bwg_params[i].filmstrip_direction?jQuery(".bwg_slideshow_image_container_"+i).height(jQuery(".bwg_slideshow_image_wrap_"+i).height()-bwg_params[i].slideshow_filmstrip_height):jQuery(".bwg_slideshow_image_container_"+i).width(jQuery(".bwg_slideshow_image_wrap_"+i).width()-bwg_params[i].slideshow_filmstrip_width);var a=/Firefox/i.test(navigator.userAgent)?"DOMMouseScroll":"mousewheel";jQuery(".bwg_slideshow_filmstrip_"+i).bind(a,function(e){var t=window.event||e;return 0<((t=t.originalEvent?t.originalEvent:t).detail?-40*t.detail:t.wheelDelta)?jQuery(".bwg_slideshow_filmstrip_left_"+i).trigger("click"):jQuery(".bwg_slideshow_filmstrip_right_"+i).trigger("click"),!1}),jQuery(".bwg_slideshow_filmstrip_right_"+i).on(t,function(){jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).stop(!0,!1),"left"==bwg_params[i].left_or_top?"width"==bwg_params[i].width_or_height?(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().left>=-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).width()-jQuery(".bwg_slideshow_filmstrip_"+i).width())&&(jQuery(".bwg_slideshow_filmstrip_left_"+i).css({opacity:1}),jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().left<-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).width()-jQuery(".bwg_slideshow_filmstrip_"+i).width()-(parseInt(bwg_params[i].filmstrip_thumb_margin_hor)+parseInt(bwg_params[i].slideshow_filmstrip_width)))?jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).animate({left:-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).width()-jQuery(".bwg_slideshow_filmstrip_"+i).width())},500,"linear"):jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).animate({left:jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().left-(parseInt(bwg_params[i].filmstrip_thumb_margin_hor)+parseInt(bwg_params[i].slideshow_filmstrip_width))},500,"linear")),window.setTimeout(function(){jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().left==-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).width()-jQuery(".bwg_slideshow_filmstrip_"+i).width())&&jQuery(".bwg_slideshow_filmstrip_right_"+i).css({opacity:.3})},500)):(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().left>=-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).height()-jQuery(".bwg_slideshow_filmstrip_"+i).height())&&(jQuery(".bwg_slideshow_filmstrip_left_"+i).css({opacity:1}),jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().left<-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).height()-jQuery(".bwg_slideshow_filmstrip_"+i).height()-(parseInt(bwg_params[i].filmstrip_thumb_margin_hor)+parseInt(bwg_params[i].slideshow_filmstrip_width)))?jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).animate({left:-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).height()-jQuery(".bwg_slideshow_filmstrip_"+i).height())},500,"linear"):jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).animate({left:jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().left-(parseInt(bwg_params[i].filmstrip_thumb_margin_hor)+parseInt(bwg_params[i].slideshow_filmstrip_width))},500,"linear")),window.setTimeout(function(){jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().left==-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).height()-jQuery(".bwg_slideshow_filmstrip_"+i).height())&&jQuery(".bwg_slideshow_filmstrip_right_"+i).css({opacity:.3})},500)):"width"==bwg_params[i].width_or_height?(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().top>=-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).width()-jQuery(".bwg_slideshow_filmstrip_"+i).width())&&(jQuery(".bwg_slideshow_filmstrip_left_"+i).css({opacity:1}),jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().top<-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).width()-jQuery(".bwg_slideshow_filmstrip_"+i).width()-parseInt(bwg_params[i].filmstrip_thumb_margin_hor)+parseInt(bwg_params[i].slideshow_filmstrip_width))?jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).animate({top:-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).width()-jQuery(".bwg_slideshow_filmstrip_"+i).width())},500,"linear"):jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).animate({top:jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().top-parseInt(bwg_params[i].filmstrip_thumb_margin_hor)+parseInt(bwg_params[i].slideshow_filmstrip_width)},500,"linear")),window.setTimeout(function(){jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().top==-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).width()-jQuery(".bwg_slideshow_filmstrip_"+i).width())&&jQuery(".bwg_slideshow_filmstrip_right_"+i).css({opacity:.3})},500)):(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().top>=-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).height()-jQuery(".bwg_slideshow_filmstrip_"+i).height())&&(jQuery(".bwg_slideshow_filmstrip_left_"+i).css({opacity:1}),jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().top<-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).height()-jQuery(".bwg_slideshow_filmstrip_"+i).height()-(parseInt(bwg_params[i].filmstrip_thumb_margin_hor)+parseInt(bwg_params[i].slideshow_filmstrip_width)))?jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).animate({top:-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).height()-jQuery(".bwg_slideshow_filmstrip_"+i).height())},500,"linear"):jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).animate({top:jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().top-(parseInt(bwg_params[i].filmstrip_thumb_margin_hor)+parseInt(bwg_params[i].slideshow_filmstrip_width))},500,"linear")),window.setTimeout(function(){jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().top==-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).height()-jQuery(".bwg_slideshow_filmstrip_"+i).height())&&jQuery(".bwg_slideshow_filmstrip_right_"+i).css({opacity:.3})},500))}),jQuery(".bwg_slideshow_filmstrip_left_"+i).on(t,function(){jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).stop(!0,!1),"left"==bwg_params[i].left_or_top?(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().left<0&&(jQuery(".bwg_slideshow_filmstrip_right_"+i).css({opacity:1}),jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().left>-(bwg_params[i].filmstrip_thumb_margin_hor+bwg_params[i].slideshow_filmstrip_width)?jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).animate({left:0},500,"linear"):jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).animate({left:jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().left+parseInt(bwg_params[i].filmstrip_thumb_margin_hor)+parseInt(bwg_params[i].slideshow_filmstrip_width)},500,"linear")),window.setTimeout(function(){0==jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().left&&jQuery(".bwg_slideshow_filmstrip_left_"+i).css({opacity:.3})},500)):(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().top<0&&(jQuery(".bwg_slideshow_filmstrip_right_"+i).css({opacity:1}),jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().top>-(bwg_params[i].filmstrip_thumb_margin_hor+bwg_params[i].slideshow_filmstrip_width)?jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).animate({top:0},500,"linear"):jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).animate({top:jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().top+parseInt(bwg_params[i].filmstrip_thumb_margin_hor)+parseInt(bwg_params[i].slideshow_filmstrip_width)},500,"linear")),window.setTimeout(function(){0==jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().top&&jQuery(".bwg_slideshow_filmstrip_left_"+i).css({opacity:.3})},500))}),"width"==bwg_params[i].width_or_height?bwg_set_filmstrip_pos(jQuery(".bwg_slideshow_filmstrip_"+i).width(),i):bwg_set_filmstrip_pos(jQuery(".bwg_slideshow_filmstrip_"+i).height(),i),jQuery("#bwg_slideshow_play_pause_"+i).off(t).on(t,function(){jQuery(".bwg_ctrl_btn_"+i).hasClass("bwg-icon-play")?(bwg_play(bwg_params[i].data,i),jQuery(".bwg_slideshow_play_pause_"+i).attr("title",bwg_objectsL10n.pause),jQuery(".bwg_slideshow_play_pause_"+i).attr("class","bwg-icon-pause bwg_ctrl_btn_"+i+" bwg_slideshow_play_pause_"+i),1==bwg_params[i].enable_slideshow_music&&document.getElementById("bwg_audio_"+i).play()):(window.clearInterval(window["bwg_playInterval"+i]),jQuery(".bwg_slideshow_play_pause_"+i).attr("title","Play"),jQuery(".bwg_slideshow_play_pause_"+i).attr("class","bwg-icon-play bwg_ctrl_btn_"+i+" bwg_slideshow_play_pause_"+i),1==bwg_params[i].enable_slideshow_music&&document.getElementById("bwg_audio_"+i).pause())}),0!=bwg_params[i].enable_slideshow_autoplay&&(bwg_play(bwg_params[i].data,i),jQuery(".bwg_slideshow_play_pause_"+i).attr("title",bwg_objectsL10n.pause),jQuery(".bwg_slideshow_play_pause_"+i).attr("class","bwg-icon-pause bwg_ctrl_btn_"+i+" bwg_slideshow_play_pause_"+i),1==bwg_params[i].enable_slideshow_music&&jQuery("#bwg_audio_"+i).length&&document.getElementById("bwg_audio_"+i).play()),bwg_params[i].preload_images&&bwg_preload_images(parseInt(jQuery("#bwg_current_image_key_".$bwg).val()),i),jQuery(".bwg_slideshow_image_"+i).removeAttr("width"),jQuery(".bwg_slideshow_image_"+i).removeAttr("height")}})}function bwg_image_browser_resize(){jQuery(".bwg_image_browser").each(function(){var e=jQuery(this).attr("data-bwg");jQuery(".image_browser_images_conteiner_"+e).length&&(bwg_params_ib[e]=JSON.parse(jQuery("#bwg_container1_"+e+" .image_browser_images_conteiner_"+e).attr("data-params")),bwg_image_browser(e))})}function bwg_image_browser_ready(){jQuery(".bwg_image_browser").each(function(){var e=jQuery(this).attr("data-bwg");bwg_container_loaded(e),jQuery(".image_browser_images_conteiner_"+e).length&&(bwg_params_ib[e]=JSON.parse(jQuery(".image_browser_images_conteiner_"+e).attr("data-params")),setTimeout(function(){bwg_image_browser(e)},3))})}function bwg_search_focus(e){jQuery(e).parent().find(".bwg_search_input").focus(),jQuery(e).hide()}function bwg_key_press(e){jQuery(e).parent().find(".bwg_search_reset_container").removeClass("bwg-hidden"),jQuery(e).parent().find(".bwg_search_loupe_container1").removeClass("bwg-hidden")}function bwg_all_thumnails_loaded(t){var i=0,a=jQuery(t).find("img").length;return 0==a?bwg_all_thumbnails_loaded_callback(t):jQuery(t).find("img").each(function(){var e=jQuery(this).attr("src");jQuery("").attr("src",e).on("load error",function(){++i>=a&&bwg_all_thumbnails_loaded_callback(t)})}),0==a}function bwg_all_thumbnails_loaded_callback(e){jQuery(e).hasClass("bwg-thumbnails")&&!jQuery(e).hasClass("bwg-masonry-thumbnails")&&bwg_thumbnail(e),jQuery(e).hasClass("bwg-masonry-thumbnails")&&bwg_thumbnail_masonry(e),jQuery(e).hasClass("bwg-album-extended")&&bwg_album_extended(e)}function bwg_album_thumbnail(e){bwg_container_loaded(jQuery(e).data("bwg"))}function bwg_album_extended(e){var t=jQuery(e).width(),i=jQuery(e).data("thumbnail-width"),a=jQuery(e).data("spacing"),r=jQuery(e).data("max-count"),_=parseInt(t/(2*i));_<1&&(_=1),r<_&&(_=r);var s=100/_,o=jQuery(e).find(".bwg-extended-item"),l=parseInt(o.css("margin-left")),n=parseInt(o.css("margin-right"));o.css({width:"calc("+s+"% - "+(l+n)+"px)"}),o.width()2*i?(o.find(".bwg-extended-item0").css({width:"calc(50% - "+a+"px)"}),o.find(".bwg-extended-item1").css({width:"calc(100% - "+(i+2*a)+"px)"})):o.find(".bwg-extended-item0, .bwg-extended-item1").css({width:"calc(50% - "+a+"px)"}),jQuery(e).children(".bwg-extended-item").each(function(){var e=jQuery(this).find("img"),t=jQuery(this).find(".bwg-item0"),i=jQuery(this).find(".bwg-item2"),a=e.data("width"),r=e.data("height");""!=a&&""!=r||(a=e.width(),r=e.height());var _=a/r;i.width()/i.height()>a/r?(i.width()>a?e.css({width:"100%",height:i.width()/_}):e.css({maxWidth:"100%",height:i.width()/_}),a=i.width(),r=i.width()/_):(i.height()>r?e.css({height:"100%",width:i.height()*_,maxWidth:"initial"}):e.css({maxHeight:"100%",width:i.height()*_,maxWidth:"initial"}),r=i.height(),a=i.height()*_),jQuery(this).find(".bwg-item2").css({marginLeft:(t.width()-a)/2,marginTop:(t.height()-r)/2})}),bwg_container_loaded(jQuery(e).data("bwg"))}function bwg_thumbnail(e){var t=jQuery(e).width(),i=jQuery(e).data("thumbnail-width"),a=jQuery(e).data("max-count"),r=parseInt(t/i)+1;ae.height()?e.css({height:"100%",width:r*o,maxWidth:"initial"}):e.css({maxHeight:"100%",width:r*o,maxWidth:"initial"}),_=(s=r)*o),jQuery(this).find(".bwg-item2").css({marginLeft:(a-_)/2,marginTop:(r-s)/2})}),bwg_container_loaded(jQuery(e).data("bwg"))}function bwg_thumbnail_masonry(e){var t="#bwg_thumbnails_masonry_"+(bwg=jQuery(e).attr("data-bwg"));jQuery("#bwg_album_masonry_"+bwg).length&&(t="#bwg_album_masonry_"+bwg),0===jQuery(".bwg-container-temp"+bwg).length&&(jQuery(t).clone().appendTo("#bwg_container3_"+bwg).removeAttr("id").removeClass("bwg-container-"+bwg).addClass("bwg-container-temp"+bwg),jQuery(".bwg-container-temp"+bwg).empty());var a=jQuery(".bwg-container-temp"+bwg),r=jQuery(t),_=a;if(a.prepend(r.html()),_.find(".bwg-empty-item").remove(),"horizontal"==_.data("masonry-type")){var s=_.data("thumbnail-height"),o=_.data("max-count"),l=[];for(i=0;i').css({height:s,order:i+1,width:n-l[i]}))}else{_.removeAttr("style");n=_.width();var g=_.data("thumbnail-width"),w=(o=_.data("max-count"),parseInt(n/g)+("0"==_.data("resizable-thumbnails")?0:1));o').css({width:h+"%",order:i+1,height:p-m[i]}));_.outerWidth(w*g),_.height(p)}if(""!=a.html()){r.outerWidth(w*g),"0"!=p?(r.css("opacity","1"),r.height(p)):r.css("opacity","0"),r.empty();var c=a.html();r.append(c),r.find(".bwg_lazyload").each(function(){null!=jQuery(this).attr("data-original")&&""!=jQuery(this).attr("data-original")&&jQuery(this).attr("src",jQuery(this).attr("data-original"))}),a.empty().hide()}bwg_container_loaded(_.data("bwg"))}function bwg_container_loaded(e){jQuery("#gal_front_form_"+e).removeClass("bwg-hidden"),jQuery("#ajax_loading_"+e).addClass("bwg-hidden")}function bwg_thumbnail_mosaic_logic(e){var t=e.attr("data-bwg"),i=e.attr("data-block-id"),a=parseInt(e.attr("data-thumb-padding"))/2,r=parseInt(e.attr("data-thumb-border"))+a;if("horizontal"==e.attr("data-mosaic-direction")){var _=parseInt(e.attr("data-height"));if("1"==e.attr("data-resizable"))if(1920<=jQuery(window).width())var s=(1+jQuery(window).width()/1920)*_;else if(jQuery(window).width()<=640)s=jQuery(window).width()/640*_;else s=_;else s=_;(c=jQuery(".bwg_mosaic_thumb_"+t)).each(function(e){var t=jQuery(this).data("width"),i=jQuery(this).data("height");""!=t&&""!=i&&void 0!==t&&void 0!==i||(t=c.get(e).naturalWidth,i=c.get(e).naturalHeight),t=t*s/i,c.eq(e).height(s),c.eq(e).width(t)});var o=jQuery("#bwg_mosaic_thumbnails_div_"+t).width()/100*parseInt(e.attr("data-total-width"));jQuery("#"+i).width(o);var l=s+2*r,n=0,g=[];g[0]=0;var w=[],b=w[0]=0;c.each(function(e){row_cum_width2=b+c.eq(e).width()+2*r,row_cum_width2-o<0?(b=row_cum_width2,g[e]=n,w[n]++):e!==c.length-1?Math.abs(b-o)>Math.abs(row_cum_width2-o)||Math.abs(b-o)<=Math.abs(row_cum_width2-o)&&0==w[n]?e!==c.length-2?(b=row_cum_width2,g[e]=n,w[n]++,w[++n]=0,b=0):(b=row_cum_width2,g[e]=n,w[n]++):(w[++n]=1,g[e]=n,b=row_cum_width2-b):(b=row_cum_width2,g[e]=n,w[n]++)});for(var u=[],d=[],h=0;h<=n;h++)u[h]=1,d[h]=l;for(h=0;h<=n;h++)b=0,c.each(function(e){g[e]==h&&(b+=c.eq(e).width())}),u[h]=z=(o-2*w[h]*r)/b,d[h]=(l-2*r)*u[h]+2*r;(S=[])[0]=0;var m=[],p=[];m[0]=0,p[0]=0;for(h=1;h<=n;h++)m[h]=m[0],p[h]=p[h-1]+d[h-1];c.each(function(e){var t=c.eq(e).width(),i=c.eq(e).height();c.eq(e).width(t*u[g[e]]),c.eq(e).height(i*u[g[e]]),c.eq(e).parent().css({top:p[g[e]],left:m[g[e]]}),m[g[e]]+=t*u[g[e]]+2*r,S[g[e]]=e}),jQuery("#"+i).height(p[n]+d[n]-p[0])}else{var c,y=parseInt(e.attr("data-width"));if("1"==e.attr("data-resizable")){if(1920<=jQuery(window).width())var f=(1+jQuery(window).width()/1920)*y;else if(jQuery(window).width()<=640)f=jQuery(window).width()/640*y;else f=y;if(0k[a]&&(i=k[a],t=a);v[e]=t,x[t]++,B=i,T=0+t*(j+2*r),c.eq(e).parent().css({top:B,left:T}),k[t]+=c.eq(e).height()+2*r}),(u=[])[0]=1;var C=0,I=[],E=0,O=0;for(z=0;z=t&&bwg_thumbnail_mosaic(jQuery(".bwg-mosaic-thumbnails[data-bwg="+e+"]"))}),jQuery(".bwg_mosaic_thumb_spun_"+e+" img").on("error",function(){jQuery(this).height(100),jQuery(this).width(100),++i>=t&&bwg_thumbnail_mosaic(jQuery(".bwg-mosaic-thumbnails[data-bwg="+e+"]"))})}function bwg_add_album(){var t=!1;"1"!=bwg_objectsL10n.front_ajax&&jQuery(document).off("click",".bwg-album").on("click",".bwg-album",function(){if(!t){var e=jQuery(this).attr("data-bwg");return t=!0,setTimeout(function(){t=!1},100),bwg_ajax("gal_front_form_"+e,e,jQuery(this).attr("data-container_id"),jQuery(this).attr("data-alb_gal_id"),jQuery(this).attr("data-album_gallery_id"),jQuery(this).attr("data-def_type"),"",jQuery(this).attr("data-title")),!1}}),jQuery(".bwg_description_more").on("click",function(){jQuery(this).hasClass("bwg_more")?(jQuery(this).parent().find(".bwg_description_full").show(),jQuery(this).addClass("bwg_hide").removeClass("bwg_more"),jQuery(this).html(jQuery(this).data("hide-msg"))):(jQuery(this).parent().find(".bwg_description_full").hide(),jQuery(this).addClass("bwg_more").removeClass("bwg_hide"),jQuery(this).html(jQuery(this).data("more-msg")))})}function bwg_add_lightbox(){var i=!1;jQuery(document).on("click",".bwg_lightbox .bwg-item0, .bwg_lightbox .bwg_slide, .bwg_lightbox .bwg-carousel-image, .bwg_lightbox .bwg-title1",function(e){e.stopPropagation(),e.preventDefault();var t=jQuery(this).closest("a");if(!i)return i=!0,setTimeout(function(){i=!1},100),bwg_gallery_box(jQuery(t).attr("data-image-id"),jQuery(t).closest(".bwg_container")),!1}),jQuery(".bwg_lightbox .bwg_ecommerce").on("click",function(e){if(e.stopPropagation(),!i)return i=!0,setTimeout(function(){i=!1},100),bwg_gallery_box(jQuery(this).closest(".bwg_lightbox").attr("data-image-id"),jQuery(this).closest(".bwg_container"),!0),!1})}function bwg_filter_by_tag(e){var t="",i=jQuery(e).parent().parent(),a=i.find(".current_view").val(),r=i.find(".form_id").val(),_=i.find(".cur_gal_id").val(),s=i.find(".album_gallery_id").val(),o=i.find(".type").val();jQuery(e).parent().find(".opt.selected").each(function(){t=t+jQuery(e).text()+","}),""==(t=t.slice(0,-1))&&(t=bwg_objectsL10n.bwg_select_tag),jQuery(e).parent().find(".CaptionCont").attr("title",t),jQuery(e).parent().find(".CaptionCont .placeholder").html(t),jQuery("#bwg_tag_id_"+a).val(jQuery("#bwg_tag_id_"+_).val()),bwg_select_tag(a,r,_,s,o,!1)}function bwg_document_ready(){bwg_add_lightbox(),jQuery(".bwg_container img").removeAttr("width").removeAttr("height"),jQuery('div[id^="bwg_container1_"]').each(function(){var e=jQuery(this);e.data("right-click-protection")&&bwg_disable_right_click(e),jQuery(".SumoSelect > .CaptionCont > label > i").addClass("bwg-icon-angle-down closed");var t=e.find(".search_tags");if("1"==bwg_objectsL10n.front_ajax&&t.length)for(var i=0;i').html(i[t].alt).text()),jQuery(".bwg_slideshow_description_text_"+r).html(jQuery('').html(i[t].description).text());var s=2==jQuery(".bwg_slideshow_image_spun_"+r).css("zIndex")?".bwg_slideshow_image_spun_"+r:".bwg_slideshow_image_second_spun_"+r,o=s==".bwg_slideshow_image_second_spun_"+r?".bwg_slideshow_image_spun_"+r:".bwg_slideshow_image_second_spun_"+r,l=-1';if(l){if(u+='',g&&(u+=''),n){var d=0,h=0;w"}u+='").html(decodeURIComponent(i[t].image_url)).text()+'" alt="'+i[t].alt+'" image_id="'+i[t].id+'" />'}u+="",jQuery(o).html(u),bwg_params[r].preload_images&&bwg_preload_images(t,r),window["bwg_"+bwg_params[r].slideshow_effect](s,o,_,r),0").attr("src",bwg_params[t].upload_url+jQuery('').html(decodeURIComponent(i[_].image_url)).text()))}else for(r=0;r").attr("src",bwg_params[t].upload_url+jQuery('').html(decodeURIComponent(i[r].image_url)).text()))}}function bwg_preload_images(e,t){void 0!==t&&""!==t?bwg_preload_images_slideshow(e,t):bwg_preload_images_lightbox(e)}function bwg_popup_resize_slidshow(e){var t=jQuery("#bwg_container1_"+e).parent();t.hasClass("elementor-tab-content")&&t.width(t.closest(".elementor-widget-wrap").width());var i=t.width(),a=bwg_params[e].data;if(i>=bwg_params[e].image_width){jQuery(".bwg_slideshow_image_wrap_"+e).css({width:bwg_params[e].image_width}),jQuery(".bwg_slideshow_image_wrap_"+e).css({height:bwg_params[e].image_height}),jQuery(".bwg_slideshow_image_container_"+e).css({width:"horizontal"==bwg_params[e].filmstrip_direction?bwg_params[e].image_width:bwg_params[e].image_width-bwg_params[e].slideshow_filmstrip_width}),jQuery(".bwg_slideshow_image_container_"+e).css({height:"horizontal"==bwg_params[e].filmstrip_direction?bwg_params[e].image_height-bwg_params[e].slideshow_filmstrip_height:bwg_params[e].image_height}),jQuery(".bwg_slideshow_image_"+e).css({cssText:(bwg_params[e].filmstrip_direction,bwg_params[e].image_width)}),jQuery(".bwg_slideshow_embed_"+e).css({cssText:(bwg_params[e].filmstrip_direction,bwg_params[e].image_width)}),bwg_resize_instagram_post(e),bwg_change_watermark_container(e);var r="horizontal"==bwg_params[e].filmstrip_direction?"width: "+bwg_params[e].image_width:"height: "+bwg_params[e].image_height,_="horizontal"==bwg_params[e].filmstrip_direction?"width: "+(bwg_params[e].image_width-40):"height: "+(bwg_params[e].image_height-40);jQuery(".bwg_slideshow_filmstrip_container_"+e).css({cssText:r}),jQuery(".bwg_slideshow_filmstrip_"+e).css({cssText:_}),jQuery(".bwg_slideshow_dots_container_"+e).css({width:bwg_params[e].image_width}),jQuery("#bwg_slideshow_play_pause-ico_"+e).css({fontSize:bwg_params[e].slideshow_play_pause_btn_size}),"image"==bwg_params[e].watermark_type&&jQuery(".bwg_slideshow_watermark_image_"+e).css({maxWidth:bwg_params[e].watermark_width,maxHeight:bwg_params[e].watermark_height}),"text"==bwg_params[e].watermark_type&&jQuery(".bwg_slideshow_watermark_text_"+e+", .bwg_slideshow_watermark_text_"+e+" :hover").css({fontSize:bwg_params[e].watermark_font_size}),jQuery(".bwg_slideshow_title_text_"+e).css({fontSize:2*bwg_params[e].slideshow_title_font_size}),jQuery(".bwg_slideshow_description_text_"+e).css({fontSize:2*bwg_params[e].slideshow_description_font_size})}else jQuery(".bwg_slideshow_image_wrap_"+e).css({width:i}),jQuery(".bwg_slideshow_image_wrap_"+e).css({height:i*bwg_params[e].image_height/bwg_params[e].image_width}),jQuery(".bwg_slideshow_image_container_"+e).css({width:i-("horizontal"==bwg_params[e].filmstrip_direction?0:bwg_params[e].slideshow_filmstrip_width)}),jQuery(".bwg_slideshow_image_container_"+e).css({height:i*bwg_params[e].image_height/bwg_params[e].image_width-("horizontal"==bwg_params[e].filmstrip_direction?bwg_params[e].slideshow_filmstrip_height:0)}),jQuery(".bwg_slideshow_image_"+e).css({cssText:"max-width: "+(i-("horizontal"==bwg_params[e].filmstrip_direction?0:bwg_params[e].slideshow_filmstrip_width))+"px !important; max-height: "+(i*(bwg_params[e].image_height/bwg_params[e].image_width)-("horizontal"==bwg_params[e].filmstrip_direction?bwg_params[e].slideshow_filmstrip_height:0)-1)+"px !important;"}),jQuery(".bwg_slideshow_embed_"+e).css({cssText:"width: "+(i-("horizontal"==bwg_params[e].filmstrip_direction?0:bwg_params[e].slideshow_filmstrip_width))+"px !important; height: "+(i*(bwg_params[e].image_height/bwg_params[e].image_width)-("horizontal"==bwg_params[e].filmstrip_direction?bwg_params[e].slideshow_filmstrip_height:0)-1)+"px !important;"}),bwg_resize_instagram_post(e),bwg_change_watermark_container(e),"horizontal"==bwg_params[e].filmstrip_direction?(jQuery(".bwg_slideshow_filmstrip_container_"+e).css({width:i}),jQuery(".bwg_slideshow_filmstrip_"+e).css({width:i-40})):(jQuery(".bwg_slideshow_filmstrip_container_"+e).css({height:i*bwg_params[e].image_height/bwg_params[e].image_width}),jQuery(".bwg_slideshow_filmstrip_"+e).css({height:i*bwg_params[e].image_height/bwg_params[e].image_width-40})),jQuery(".bwg_slideshow_dots_container_"+e).css({width:i}),jQuery("#bwg_slideshow_play_pause-ico_"+e).css({fontSize:i*bwg_params[e].slideshow_play_pause_btn_size/bwg_params[e].image_width}),jQuery(".bwg_slideshow_watermark_image_"+e).css({maxWidth:i*bwg_params[e].watermark_width/bwg_params[e].image_width,maxHeight:i*bwg_params[e].watermark_height/bwg_params[e].image_width}),jQuery(".bwg_slideshow_watermark_text_"+e+", .bwg_slideshow_watermark_text_"+e+":hover").css({fontSize:i*bwg_params[e].watermark_font_size/bwg_params[e].image_width}),jQuery(".bwg_slideshow_title_text_"+e).css({fontSize:2*i*bwg_params[e].slideshow_title_font_size/bwg_params[e].image_width}),jQuery(".bwg_slideshow_description_text_"+e).css({fontSize:2*i*bwg_params[e].slideshow_description_font_size/bwg_params[e].image_width}),jQuery(".bwg_slideshow_image_"+e).css({display:"inline-block"});a[parseInt(jQuery("#bwg_current_image_key_"+e).val())].is_embed_video?jQuery("#bwg_slideshow_play_pause_"+e).css({display:"none"}):jQuery("#bwg_slideshow_play_pause_"+e).css({display:""})}function bwg_popup_resize(e){void 0!==e&&""!==e?bwg_popup_resize_slidshow(e):bwg_popup_resize_lightbox()}function bwg_change_image(e,t,i,a,r){void 0!==r&&""!==r?bwg_change_image_slideshow(e,t,i,a,r):bwg_change_image_lightbox(e,t,i=gallery_box_data.data,a)}function bwg_resize_instagram_post(e){if(void 0!==e&&""!==e){if(jQuery(".inner_instagram_iframe_bwg_embed_frame_"+e).length){var t=jQuery(".bwg_slideshow_embed_"+e).width(),i=jQuery(".bwg_slideshow_embed_").height();jQuery(".inner_instagram_iframe_bwg_embed_frame_"+e).each(function(){var e=jQuery(this).parent();i/(parseInt(e.attr("data-height"))+96) https://demolicionescordoba.es/wp-content/plugins/revslider/public/assets/js/jquery.themepunch.tools.min.js /******************************************** - THEMEPUNCH TOOLS Ver. 1.0 - Last Update of Tools 08.03.2018 *********************************************/ /* * @fileOverview TouchSwipe - jQuery Plugin * @version 1.6.9 * * @author Matt Bryson http://www.github.com/mattbryson * @see https://github.com/mattbryson/TouchSwipe-Jquery-Plugin * @see http://labs.skinkers.com/touchSwipe/ * @see http://plugins.jquery.com/project/touchSwipe * * Copyright (c) 2010 Matt Bryson * Dual licensed under the MIT or GPL Version 2 licenses. * */ (function(a){if(typeof define==="function"&&define.amd&&define.amd.jQuery){define(["jquery"],a)}else{a(jQuery)}}(function(f){var y="1.6.9",p="left",o="right",e="up",x="down",c="in",A="out",m="none",s="auto",l="swipe",t="pinch",B="tap",j="doubletap",b="longtap",z="hold",E="horizontal",u="vertical",i="all",r=10,g="start",k="move",h="end",q="cancel",a="ontouchstart" in window,v=window.navigator.msPointerEnabled&&!window.navigator.pointerEnabled,d=window.navigator.pointerEnabled||window.navigator.msPointerEnabled,C="TouchSwipe";var n={fingers:1,threshold:75,cancelThreshold:null,pinchThreshold:20,maxTimeThreshold:null,fingerReleaseThreshold:250,longTapThreshold:500,doubleTapThreshold:200,swipe:null,swipeLeft:null,swipeRight:null,swipeUp:null,swipeDown:null,swipeStatus:null,pinchIn:null,pinchOut:null,pinchStatus:null,click:null,tap:null,doubleTap:null,longTap:null,hold:null,triggerOnTouchEnd:true,triggerOnTouchLeave:false,allowPageScroll:"auto",fallbackToMouseEvents:true,excludedElements:"label, button, input, select, textarea, a, .noSwipe",preventDefaultEvents:true};f.fn.swipetp=function(H){var G=f(this),F=G.data(C);if(F&&typeof H==="string"){if(F[H]){return F[H].apply(this,Array.prototype.slice.call(arguments,1))}else{f.error("Method "+H+" does not exist on jQuery.swipetp")}}else{if(!F&&(typeof H==="object"||!H)){return w.apply(this,arguments)}}return G};f.fn.swipetp.version=y;f.fn.swipetp.defaults=n;f.fn.swipetp.phases={PHASE_START:g,PHASE_MOVE:k,PHASE_END:h,PHASE_CANCEL:q};f.fn.swipetp.directions={LEFT:p,RIGHT:o,UP:e,DOWN:x,IN:c,OUT:A};f.fn.swipetp.pageScroll={NONE:m,HORIZONTAL:E,VERTICAL:u,AUTO:s};f.fn.swipetp.fingers={ONE:1,TWO:2,THREE:3,ALL:i};function w(F){if(F&&(F.allowPageScroll===undefined&&(F.swipe!==undefined||F.swipeStatus!==undefined))){F.allowPageScroll=m}if(F.click!==undefined&&F.tap===undefined){F.tap=F.click}if(!F){F={}}F=f.extend({},f.fn.swipetp.defaults,F);return this.each(function(){var H=f(this);var G=H.data(C);if(!G){G=new D(this,F);H.data(C,G)}})}function D(a5,aw){var aA=(a||d||!aw.fallbackToMouseEvents),K=aA?(d?(v?"MSPointerDown":"pointerdown"):"touchstart"):"mousedown",az=aA?(d?(v?"MSPointerMove":"pointermove"):"touchmove"):"mousemove",V=aA?(d?(v?"MSPointerUp":"pointerup"):"touchend"):"mouseup",T=aA?null:"mouseleave",aE=(d?(v?"MSPointerCancel":"pointercancel"):"touchcancel");var ah=0,aQ=null,ac=0,a2=0,a0=0,H=1,ar=0,aK=0,N=null;var aS=f(a5);var aa="start";var X=0;var aR=null;var U=0,a3=0,a6=0,ae=0,O=0;var aX=null,ag=null;try{aS.bind(K,aO);aS.bind(aE,ba)}catch(al){f.error("events not supported "+K+","+aE+" on jQuery.swipetp")}this.enable=function(){aS.bind(K,aO);aS.bind(aE,ba);return aS};this.disable=function(){aL();return aS};this.destroy=function(){aL();aS.data(C,null);aS=null};this.option=function(bd,bc){if(aw[bd]!==undefined){if(bc===undefined){return aw[bd]}else{aw[bd]=bc}}else{f.error("Option "+bd+" does not exist on jQuery.swipetp.options")}return null};function aO(be){if(aC()){return}if(f(be.target).closest(aw.excludedElements,aS).length>0){return}var bf=be.originalEvent?be.originalEvent:be;var bd,bg=bf.touches,bc=bg?bg[0]:bf;aa=g;if(bg){X=bg.length}else{be.preventDefault()}ah=0;aQ=null;aK=null;ac=0;a2=0;a0=0;H=1;ar=0;aR=ak();N=ab();S();if(!bg||(X===aw.fingers||aw.fingers===i)||aY()){aj(0,bc);U=au();if(X==2){aj(1,bg[1]);a2=a0=av(aR[0].start,aR[1].start)}if(aw.swipeStatus||aw.pinchStatus){bd=P(bf,aa)}}else{bd=false}if(bd===false){aa=q;P(bf,aa);return bd}else{if(aw.hold){ag=setTimeout(f.proxy(function(){aS.trigger("hold",[bf.target]);if(aw.hold){bd=aw.hold.call(aS,bf,bf.target)}},this),aw.longTapThreshold)}ap(true)}return null}function a4(bf){var bi=bf.originalEvent?bf.originalEvent:bf;if(aa===h||aa===q||an()){return}var be,bj=bi.touches,bd=bj?bj[0]:bi;var bg=aI(bd);a3=au();if(bj){X=bj.length}if(aw.hold){clearTimeout(ag)}aa=k;if(X==2){if(a2==0){aj(1,bj[1]);a2=a0=av(aR[0].start,aR[1].start)}else{aI(bj[1]);a0=av(aR[0].end,aR[1].end);aK=at(aR[0].end,aR[1].end)}H=a8(a2,a0);ar=Math.abs(a2-a0)}if((X===aw.fingers||aw.fingers===i)||!bj||aY()){aQ=aM(bg.start,bg.end);am(bf,aQ);ah=aT(bg.start,bg.end);ac=aN();aJ(aQ,ah);if(aw.swipeStatus||aw.pinchStatus){be=P(bi,aa)}if(!aw.triggerOnTouchEnd||aw.triggerOnTouchLeave){var bc=true;if(aw.triggerOnTouchLeave){var bh=aZ(this);bc=F(bg.end,bh)}if(!aw.triggerOnTouchEnd&&bc){aa=aD(k)}else{if(aw.triggerOnTouchLeave&&!bc){aa=aD(h)}}if(aa==q||aa==h){P(bi,aa)}}}else{aa=q;P(bi,aa)}if(be===false){aa=q;P(bi,aa)}}function M(bc){var bd=bc.originalEvent?bc.originalEvent:bc,be=bd.touches;if(be){if(be.length){G();return true}}if(an()){X=ae}a3=au();ac=aN();if(bb()||!ao()){aa=q;P(bd,aa)}else{if(aw.triggerOnTouchEnd||(aw.triggerOnTouchEnd==false&&aa===k)){bc.preventDefault();aa=h;P(bd,aa)}else{if(!aw.triggerOnTouchEnd&&a7()){aa=h;aG(bd,aa,B)}else{if(aa===k){aa=q;P(bd,aa)}}}}ap(false);return null}function ba(){X=0;a3=0;U=0;a2=0;a0=0;H=1;S();ap(false)}function L(bc){var bd=bc.originalEvent?bc.originalEvent:bc;if(aw.triggerOnTouchLeave){aa=aD(h);P(bd,aa)}}function aL(){aS.unbind(K,aO);aS.unbind(aE,ba);aS.unbind(az,a4);aS.unbind(V,M);if(T){aS.unbind(T,L)}ap(false)}function aD(bg){var bf=bg;var be=aB();var bd=ao();var bc=bb();if(!be||bc){bf=q}else{if(bd&&bg==k&&(!aw.triggerOnTouchEnd||aw.triggerOnTouchLeave)){bf=h}else{if(!bd&&bg==h&&aw.triggerOnTouchLeave){bf=q}}}return bf}function P(be,bc){var bd,bf=be.touches;if((J()||W())||(Q()||aY())){if(J()||W()){bd=aG(be,bc,l)}if((Q()||aY())&&bd!==false){bd=aG(be,bc,t)}}else{if(aH()&&bd!==false){bd=aG(be,bc,j)}else{if(aq()&&bd!==false){bd=aG(be,bc,b)}else{if(ai()&&bd!==false){bd=aG(be,bc,B)}}}}if(bc===q){ba(be)}if(bc===h){if(bf){if(!bf.length){ba(be)}}else{ba(be)}}return bd}function aG(bf,bc,be){var bd;if(be==l){aS.trigger("swipeStatus",[bc,aQ||null,ah||0,ac||0,X,aR]);if(aw.swipeStatus){bd=aw.swipeStatus.call(aS,bf,bc,aQ||null,ah||0,ac||0,X,aR);if(bd===false){return false}}if(bc==h&&aW()){aS.trigger("swipe",[aQ,ah,ac,X,aR]);if(aw.swipe){bd=aw.swipe.call(aS,bf,aQ,ah,ac,X,aR);if(bd===false){return false}}switch(aQ){case p:aS.trigger("swipeLeft",[aQ,ah,ac,X,aR]);if(aw.swipeLeft){bd=aw.swipeLeft.call(aS,bf,aQ,ah,ac,X,aR)}break;case o:aS.trigger("swipeRight",[aQ,ah,ac,X,aR]);if(aw.swipeRight){bd=aw.swipeRight.call(aS,bf,aQ,ah,ac,X,aR)}break;case e:aS.trigger("swipeUp",[aQ,ah,ac,X,aR]);if(aw.swipeUp){bd=aw.swipeUp.call(aS,bf,aQ,ah,ac,X,aR)}break;case x:aS.trigger("swipeDown",[aQ,ah,ac,X,aR]);if(aw.swipeDown){bd=aw.swipeDown.call(aS,bf,aQ,ah,ac,X,aR)}break}}}if(be==t){aS.trigger("pinchStatus",[bc,aK||null,ar||0,ac||0,X,H,aR]);if(aw.pinchStatus){bd=aw.pinchStatus.call(aS,bf,bc,aK||null,ar||0,ac||0,X,H,aR);if(bd===false){return false}}if(bc==h&&a9()){switch(aK){case c:aS.trigger("pinchIn",[aK||null,ar||0,ac||0,X,H,aR]);if(aw.pinchIn){bd=aw.pinchIn.call(aS,bf,aK||null,ar||0,ac||0,X,H,aR)}break;case A:aS.trigger("pinchOut",[aK||null,ar||0,ac||0,X,H,aR]);if(aw.pinchOut){bd=aw.pinchOut.call(aS,bf,aK||null,ar||0,ac||0,X,H,aR)}break}}}if(be==B){if(bc===q||bc===h){clearTimeout(aX);clearTimeout(ag);if(Z()&&!I()){O=au();aX=setTimeout(f.proxy(function(){O=null;aS.trigger("tap",[bf.target]);if(aw.tap){bd=aw.tap.call(aS,bf,bf.target)}},this),aw.doubleTapThreshold)}else{O=null;aS.trigger("tap",[bf.target]);if(aw.tap){bd=aw.tap.call(aS,bf,bf.target)}}}}else{if(be==j){if(bc===q||bc===h){clearTimeout(aX);O=null;aS.trigger("doubletap",[bf.target]);if(aw.doubleTap){bd=aw.doubleTap.call(aS,bf,bf.target)}}}else{if(be==b){if(bc===q||bc===h){clearTimeout(aX);O=null;aS.trigger("longtap",[bf.target]);if(aw.longTap){bd=aw.longTap.call(aS,bf,bf.target)}}}}}return bd}function ao(){var bc=true;if(aw.threshold!==null){bc=ah>=aw.threshold}return bc}function bb(){var bc=false;if(aw.cancelThreshold!==null&&aQ!==null){bc=(aU(aQ)-ah)>=aw.cancelThreshold}return bc}function af(){if(aw.pinchThreshold!==null){return ar>=aw.pinchThreshold}return true}function aB(){var bc;if(aw.maxTimeThreshold){if(ac>=aw.maxTimeThreshold){bc=false}else{bc=true}}else{bc=true}return bc}function am(bc,bd){if(aw.preventDefaultEvents===false){return}if(aw.allowPageScroll===m){bc.preventDefault()}else{var be=aw.allowPageScroll===s;switch(bd){case p:if((aw.swipeLeft&&be)||(!be&&aw.allowPageScroll!=E)){bc.preventDefault()}break;case o:if((aw.swipeRight&&be)||(!be&&aw.allowPageScroll!=E)){bc.preventDefault()}break;case e:if((aw.swipeUp&&be)||(!be&&aw.allowPageScroll!=u)){bc.preventDefault()}break;case x:if((aw.swipeDown&&be)||(!be&&aw.allowPageScroll!=u)){bc.preventDefault()}break}}}function a9(){var bd=aP();var bc=Y();var be=af();return bd&&bc&&be}function aY(){return !!(aw.pinchStatus||aw.pinchIn||aw.pinchOut)}function Q(){return !!(a9()&&aY())}function aW(){var bf=aB();var bh=ao();var be=aP();var bc=Y();var bd=bb();var bg=!bd&&bc&&be&&bh&&bf;return bg}function W(){return !!(aw.swipe||aw.swipeStatus||aw.swipeLeft||aw.swipeRight||aw.swipeUp||aw.swipeDown)}function J(){return !!(aW()&&W())}function aP(){return((X===aw.fingers||aw.fingers===i)||!a)}function Y(){return aR[0].end.x!==0}function a7(){return !!(aw.tap)}function Z(){return !!(aw.doubleTap)}function aV(){return !!(aw.longTap)}function R(){if(O==null){return false}var bc=au();return(Z()&&((bc-O)<=aw.doubleTapThreshold))}function I(){return R()}function ay(){return((X===1||!a)&&(isNaN(ah)||ahaw.longTapThreshold)&&(ah=0)){return p}else{if((be<=360)&&(be>=315)){return p}else{if((be>=135)&&(be<=225)){return o}else{if((be>45)&&(be<135)){return x}else{return e}}}}}function au(){var bc=new Date();return bc.getTime()}function aZ(bc){bc=f(bc);var be=bc.offset();var bd={left:be.left,right:be.left+bc.outerWidth(),top:be.top,bottom:be.top+bc.outerHeight()};return bd}function F(bc,bd){return(bc.x>bd.left&&bc.xbd.top&&bc.y-1;)(l=q[f[s]]||new r(f[s],[])).gsClass?(i[s]=l.gsClass,t--):j&&l.sc.push(this);if(0===t&&g){if(m=("com.greensock."+d).split("."),n=m.pop(),o=k(m.join("."))[n]=this.gsClass=g.apply(g,i),h)if(e[n]=c[n]=o,p="undefined"!=typeof module&&module.exports,!p&&"function"==typeof define&&define.amd)define((a.GreenSockAMDPath?a.GreenSockAMDPath+"/":"")+d.split(".").pop(),[],function(){return o});else if(p)if(d===b){module.exports=c[b]=o;for(s in c)o[s]=c[s]}else c[b]&&(c[b][n]=o);for(s=0;s-1;)for(f=i[j],e=d?t("easing."+f,null,!0):l.easing[f]||{},g=k.length;--g>-1;)h=k[g],w[f+"."+h]=w[h+f]=e[h]=a.getRatio?a:a[h]||new a};for(h=v.prototype,h._calcEnd=!1,h.getRatio=function(a){if(this._func)return this._params[0]=a,this._func.apply(null,this._params);var b=this._type,c=this._power,d=1===b?1-a:2===b?a:.5>a?2*a:2*(1-a);return 1===c?d*=d:2===c?d*=d*d:3===c?d*=d*d*d:4===c&&(d*=d*d*d*d),1===b?1-d:2===b?d:.5>a?d/2:1-d/2},f=["Linear","Quad","Cubic","Quart","Quint,Strong"],g=f.length;--g>-1;)h=f[g]+",Power"+g,x(new v(null,null,1,g),h,"easeOut",!0),x(new v(null,null,2,g),h,"easeIn"+(0===g?",easeNone":"")),x(new v(null,null,3,g),h,"easeInOut");w.linear=l.easing.Linear.easeIn,w.swing=l.easing.Quad.easeInOut;var y=t("events.EventDispatcher",function(a){this._listeners={},this._eventTarget=a||this});h=y.prototype,h.addEventListener=function(a,b,c,d,e){e=e||0;var f,g,h=this._listeners[a],k=0;for(this!==i||j||i.wake(),null==h&&(this._listeners[a]=h=[]),g=h.length;--g>-1;)f=h[g],f.c===b&&f.s===c?h.splice(g,1):0===k&&f.pr-1;)if(d[c].c===b)return void d.splice(c,1)},h.dispatchEvent=function(a){var b,c,d,e=this._listeners[a];if(e)for(b=e.length,b>1&&(e=e.slice(0)),c=this._eventTarget;--b>-1;)d=e[b],d&&(d.up?d.c.call(d.s||c,{type:a,target:c}):d.c.call(d.s||c))};var z=a.requestAnimationFrame,A=a.cancelAnimationFrame,B=Date.now||function(){return(new Date).getTime()},C=B();for(f=["ms","moz","webkit","o"],g=f.length;--g>-1&&!z;)z=a[f[g]+"RequestAnimationFrame"],A=a[f[g]+"CancelAnimationFrame"]||a[f[g]+"CancelRequestAnimationFrame"];t("Ticker",function(a,b){var c,e,f,g,h,k=this,l=B(),n=b!==!1&&z?"auto":!1,p=500,q=33,r="tick",s=function(a){var b,d,i=B()-C;i>p&&(l+=i-q),C+=i,k.time=(C-l)/1e3,b=k.time-h,(!c||b>0||a===!0)&&(k.frame++,h+=b+(b>=g?.004:g-b),d=!0),a!==!0&&(f=e(s)),d&&k.dispatchEvent(r)};y.call(k),k.time=k.frame=0,k.tick=function(){s(!0)},k.lagSmoothing=function(a,b){p=a||1/m,q=Math.min(b,p,0)},k.sleep=function(){null!=f&&(n&&A?A(f):clearTimeout(f),e=o,f=null,k===i&&(j=!1))},k.wake=function(a){null!==f?k.sleep():a?l+=-C+(C=B()):k.frame>10&&(C=B()-p+5),e=0===c?o:n&&z?z:function(a){return setTimeout(a,1e3*(h-k.time)+1|0)},k===i&&(j=!0),s(2)},k.fps=function(a){return arguments.length?(c=a,g=1/(c||60),h=this.time+g,void k.wake()):c},k.useRAF=function(a){return arguments.length?(k.sleep(),n=a,void k.fps(c)):n},k.fps(a),setTimeout(function(){"auto"===n&&k.frame<5&&"hidden"!==d.visibilityState&&k.useRAF(!1)},1500)}),h=l.Ticker.prototype=new l.events.EventDispatcher,h.constructor=l.Ticker;var D=t("core.Animation",function(a,b){if(this.vars=b=b||{},this._duration=this._totalDuration=a||0,this._delay=Number(b.delay)||0,this._timeScale=1,this._active=b.immediateRender===!0,this.data=b.data,this._reversed=b.reversed===!0,W){j||i.wake();var c=this.vars.useFrames?V:W;c.add(this,c._time),this.vars.paused&&this.paused(!0)}});i=D.ticker=new l.Ticker,h=D.prototype,h._dirty=h._gc=h._initted=h._paused=!1,h._totalTime=h._time=0,h._rawPrevTime=-1,h._next=h._last=h._onUpdate=h._timeline=h.timeline=null,h._paused=!1;var E=function(){j&&B()-C>2e3&&i.wake(),setTimeout(E,2e3)};E(),h.play=function(a,b){return null!=a&&this.seek(a,b),this.reversed(!1).paused(!1)},h.pause=function(a,b){return null!=a&&this.seek(a,b),this.paused(!0)},h.resume=function(a,b){return null!=a&&this.seek(a,b),this.paused(!1)},h.seek=function(a,b){return this.totalTime(Number(a),b!==!1)},h.restart=function(a,b){return this.reversed(!1).paused(!1).totalTime(a?-this._delay:0,b!==!1,!0)},h.reverse=function(a,b){return null!=a&&this.seek(a||this.totalDuration(),b),this.reversed(!0).paused(!1)},h.render=function(a,b,c){},h.invalidate=function(){return this._time=this._totalTime=0,this._initted=this._gc=!1,this._rawPrevTime=-1,(this._gc||!this.timeline)&&this._enabled(!0),this},h.isActive=function(){var a,b=this._timeline,c=this._startTime;return!b||!this._gc&&!this._paused&&b.isActive()&&(a=b.rawTime(!0))>=c&&a-1;)"{self}"===a[b]&&(c[b]=this);return c},h._callback=function(a){var b=this.vars,c=b[a],d=b[a+"Params"],e=b[a+"Scope"]||b.callbackScope||this,f=d?d.length:0;switch(f){case 0:c.call(e);break;case 1:c.call(e,d[0]);break;case 2:c.call(e,d[0],d[1]);break;default:c.apply(e,d)}},h.eventCallback=function(a,b,c,d){if("on"===(a||"").substr(0,2)){var e=this.vars;if(1===arguments.length)return e[a];null==b?delete e[a]:(e[a]=b,e[a+"Params"]=p(c)&&-1!==c.join("").indexOf("{self}")?this._swapSelfInParams(c):c,e[a+"Scope"]=d),"onUpdate"===a&&(this._onUpdate=b)}return this},h.delay=function(a){return arguments.length?(this._timeline.smoothChildTiming&&this.startTime(this._startTime+a-this._delay),this._delay=a,this):this._delay},h.duration=function(a){return arguments.length?(this._duration=this._totalDuration=a,this._uncache(!0),this._timeline.smoothChildTiming&&this._time>0&&this._timethis._duration?this._duration:a,b)):this._time},h.totalTime=function(a,b,c){if(j||i.wake(),!arguments.length)return this._totalTime;if(this._timeline){if(0>a&&!c&&(a+=this.totalDuration()),this._timeline.smoothChildTiming){this._dirty&&this.totalDuration();var d=this._totalDuration,e=this._timeline;if(a>d&&!c&&(a=d),this._startTime=(this._paused?this._pauseTime:e._time)-(this._reversed?d-a:a)/this._timeScale,e._dirty||this._uncache(!1),e._timeline)for(;e._timeline;)e._timeline._time!==(e._startTime+e._totalTime)/e._timeScale&&e.totalTime(e._totalTime,!0),e=e._timeline}this._gc&&this._enabled(!0,!1),(this._totalTime!==a||0===this._duration)&&(J.length&&Y(),this.render(a,b,!1),J.length&&Y())}return this},h.progress=h.totalProgress=function(a,b){var c=this.duration();return arguments.length?this.totalTime(c*a,b):c?this._time/c:this.ratio},h.startTime=function(a){return arguments.length?(a!==this._startTime&&(this._startTime=a,this.timeline&&this.timeline._sortChildren&&this.timeline.add(this,a-this._delay)),this):this._startTime},h.endTime=function(a){return this._startTime+(0!=a?this.totalDuration():this.duration())/this._timeScale},h.timeScale=function(a){if(!arguments.length)return this._timeScale;if(a=a||m,this._timeline&&this._timeline.smoothChildTiming){var b=this._pauseTime,c=b||0===b?b:this._timeline.totalTime();this._startTime=c-(c-this._startTime)*this._timeScale/a}return this._timeScale=a,this._uncache(!1)},h.reversed=function(a){return arguments.length?(a!=this._reversed&&(this._reversed=a,this.totalTime(this._timeline&&!this._timeline.smoothChildTiming?this.totalDuration()-this._totalTime:this._totalTime,!0)),this):this._reversed},h.paused=function(a){if(!arguments.length)return this._paused;var b,c,d=this._timeline;return a!=this._paused&&d&&(j||a||i.wake(),b=d.rawTime(),c=b-this._pauseTime,!a&&d.smoothChildTiming&&(this._startTime+=c,this._uncache(!1)),this._pauseTime=a?b:null,this._paused=a,this._active=this.isActive(),!a&&0!==c&&this._initted&&this.duration()&&(b=d.smoothChildTiming?this._totalTime:(b-this._startTime)/this._timeScale,this.render(b,b===this._totalTime,!0))),this._gc&&!a&&this._enabled(!0,!1),this};var F=t("core.SimpleTimeline",function(a){D.call(this,0,a),this.autoRemoveChildren=this.smoothChildTiming=!0});h=F.prototype=new D,h.constructor=F,h.kill()._gc=!1,h._first=h._last=h._recent=null,h._sortChildren=!1,h.add=h.insert=function(a,b,c,d){var e,f;if(a._startTime=Number(b||0)+a._delay,a._paused&&this!==a._timeline&&(a._pauseTime=a._startTime+(this.rawTime()-a._startTime)/a._timeScale),a.timeline&&a.timeline._remove(a,!0),a.timeline=a._timeline=this,a._gc&&a._enabled(!0,!0),e=this._last,this._sortChildren)for(f=a._startTime;e&&e._startTime>f;)e=e._prev;return e?(a._next=e._next,e._next=a):(a._next=this._first,this._first=a),a._next?a._next._prev=a:this._last=a,a._prev=e,this._recent=a,this._timeline&&this._uncache(!0),this},h._remove=function(a,b){return a.timeline===this&&(b||a._enabled(!1,!0),a._prev?a._prev._next=a._next:this._first===a&&(this._first=a._next),a._next?a._next._prev=a._prev:this._last===a&&(this._last=a._prev),a._next=a._prev=a.timeline=null,a===this._recent&&(this._recent=this._last),this._timeline&&this._uncache(!0)),this},h.render=function(a,b,c){var d,e=this._first;for(this._totalTime=this._time=this._rawPrevTime=a;e;)d=e._next,(e._active||a>=e._startTime&&!e._paused)&&(e._reversed?e.render((e._dirty?e.totalDuration():e._totalDuration)-(a-e._startTime)*e._timeScale,b,c):e.render((a-e._startTime)*e._timeScale,b,c)),e=d},h.rawTime=function(){return j||i.wake(),this._totalTime};var G=t("TweenLite",function(b,c,d){if(D.call(this,c,d),this.render=G.prototype.render,null==b)throw"Cannot tween a null target.";this.target=b="string"!=typeof b?b:G.selector(b)||b;var e,f,g,h=b.jquery||b.length&&b!==a&&b[0]&&(b[0]===a||b[0].nodeType&&b[0].style&&!b.nodeType),i=this.vars.overwrite;if(this._overwrite=i=null==i?U[G.defaultOverwrite]:"number"==typeof i?i>>0:U[i],(h||b instanceof Array||b.push&&p(b))&&"number"!=typeof b[0])for(this._targets=g=n(b),this._propLookup=[],this._siblings=[],e=0;e1&&_(f,this,null,1,this._siblings[e])):(f=g[e--]=G.selector(f),"string"==typeof f&&g.splice(e+1,1)):g.splice(e--,1);else this._propLookup={},this._siblings=Z(b,this,!1),1===i&&this._siblings.length>1&&_(b,this,null,1,this._siblings);(this.vars.immediateRender||0===c&&0===this._delay&&this.vars.immediateRender!==!1)&&(this._time=-m,this.render(Math.min(0,-this._delay)))},!0),H=function(b){return b&&b.length&&b!==a&&b[0]&&(b[0]===a||b[0].nodeType&&b[0].style&&!b.nodeType)},I=function(a,b){var c,d={};for(c in a)T[c]||c in b&&"transform"!==c&&"x"!==c&&"y"!==c&&"width"!==c&&"height"!==c&&"className"!==c&&"border"!==c||!(!Q[c]||Q[c]&&Q[c]._autoCSS)||(d[c]=a[c],delete a[c]);a.css=d};h=G.prototype=new D,h.constructor=G,h.kill()._gc=!1,h.ratio=0,h._firstPT=h._targets=h._overwrittenProps=h._startAt=null,h._notifyPluginsOfEnabled=h._lazy=!1,G.version="1.19.1",G.defaultEase=h._ease=new v(null,null,1,1),G.defaultOverwrite="auto",G.ticker=i,G.autoSleep=120,G.lagSmoothing=function(a,b){i.lagSmoothing(a,b)},G.selector=a.$||a.jQuery||function(b){var c=a.$||a.jQuery;return c?(G.selector=c,c(b)):"undefined"==typeof d?b:d.querySelectorAll?d.querySelectorAll(b):d.getElementById("#"===b.charAt(0)?b.substr(1):b)};var J=[],K={},L=/(?:(-|-=|\+=)?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/gi,M=function(a){for(var b,c=this._firstPT,d=1e-6;c;)b=c.blob?1===a?this.end:a?this.join(""):this.start:c.c*a+c.s,c.m?b=c.m(b,this._target||c.t):d>b&&b>-d&&!c.blob&&(b=0),c.f?c.fp?c.t[c.p](c.fp,b):c.t[c.p](b):c.t[c.p]=b,c=c._next},N=function(a,b,c,d){var e,f,g,h,i,j,k,l=[],m=0,n="",o=0;for(l.start=a,l.end=b,a=l[0]=a+"",b=l[1]=b+"",c&&(c(l),a=l[0],b=l[1]),l.length=0,e=a.match(L)||[],f=b.match(L)||[],d&&(d._next=null,d.blob=1,l._firstPT=l._applyPT=d),i=f.length,h=0;i>h;h++)k=f[h],j=b.substr(m,b.indexOf(k,m)-m),n+=j||!h?j:",",m+=j.length,o?o=(o+1)%5:"rgba("===j.substr(-5)&&(o=1),k===e[h]||e.length<=h?n+=k:(n&&(l.push(n),n=""),g=parseFloat(e[h]),l.push(g),l._firstPT={_next:l._firstPT,t:l,p:l.length-1,s:g,c:("="===k.charAt(1)?parseInt(k.charAt(0)+"1",10)*parseFloat(k.substr(2)):parseFloat(k)-g)||0,f:0,m:o&&4>o?Math.round:0}),m+=k.length;return n+=b.substr(m),n&&l.push(n),l.setRatio=M,l},O=function(a,b,c,d,e,f,g,h,i){"function"==typeof d&&(d=d(i||0,a));var j,k=typeof a[b],l="function"!==k?"":b.indexOf("set")||"function"!=typeof a["get"+b.substr(3)]?b:"get"+b.substr(3),m="get"!==c?c:l?g?a[l](g):a[l]():a[b],n="string"==typeof d&&"="===d.charAt(1),o={t:a,p:b,s:m,f:"function"===k,pg:0,n:e||b,m:f?"function"==typeof f?f:Math.round:0,pr:0,c:n?parseInt(d.charAt(0)+"1",10)*parseFloat(d.substr(2)):parseFloat(d)-m||0};return("number"!=typeof m||"number"!=typeof d&&!n)&&(g||isNaN(m)||!n&&isNaN(d)||"boolean"==typeof m||"boolean"==typeof d?(o.fp=g,j=N(m,n?o.s+o.c:d,h||G.defaultStringFilter,o),o={t:j,p:"setRatio",s:0,c:1,f:2,pg:0,n:e||b,pr:0,m:0}):(o.s=parseFloat(m),n||(o.c=parseFloat(d)-o.s||0))),o.c?((o._next=this._firstPT)&&(o._next._prev=o),this._firstPT=o,o):void 0},P=G._internals={isArray:p,isSelector:H,lazyTweens:J,blobDif:N},Q=G._plugins={},R=P.tweenLookup={},S=0,T=P.reservedProps={ease:1,delay:1,overwrite:1,onComplete:1,onCompleteParams:1,onCompleteScope:1,useFrames:1,runBackwards:1,startAt:1,onUpdate:1,onUpdateParams:1,onUpdateScope:1,onStart:1,onStartParams:1,onStartScope:1,onReverseComplete:1,onReverseCompleteParams:1,onReverseCompleteScope:1,onRepeat:1,onRepeatParams:1,onRepeatScope:1,easeParams:1,yoyo:1,immediateRender:1,repeat:1,repeatDelay:1,data:1,paused:1,reversed:1,autoCSS:1,lazy:1,onOverwrite:1,callbackScope:1,stringFilter:1,id:1},U={none:0,all:1,auto:2,concurrent:3,allOnStart:4,preexisting:5,"true":1,"false":0},V=D._rootFramesTimeline=new F,W=D._rootTimeline=new F,X=30,Y=P.lazyRender=function(){var a,b=J.length;for(K={};--b>-1;)a=J[b],a&&a._lazy!==!1&&(a.render(a._lazy[0],a._lazy[1],!0),a._lazy=!1);J.length=0};W._startTime=i.time,V._startTime=i.frame,W._active=V._active=!0,setTimeout(Y,1),D._updateRoot=G.render=function(){var a,b,c;if(J.length&&Y(),W.render((i.time-W._startTime)*W._timeScale,!1,!1),V.render((i.frame-V._startTime)*V._timeScale,!1,!1),J.length&&Y(),i.frame>=X){X=i.frame+(parseInt(G.autoSleep,10)||120);for(c in R){for(b=R[c].tweens,a=b.length;--a>-1;)b[a]._gc&&b.splice(a,1);0===b.length&&delete R[c]}if(c=W._first,(!c||c._paused)&&G.autoSleep&&!V._first&&1===i._listeners.tick.length){for(;c&&c._paused;)c=c._next;c||i.sleep()}}},i.addEventListener("tick",D._updateRoot);var Z=function(a,b,c){var d,e,f=a._gsTweenID;if(R[f||(a._gsTweenID=f="t"+S++)]||(R[f]={target:a,tweens:[]}),b&&(d=R[f].tweens,d[e=d.length]=b,c))for(;--e>-1;)d[e]===b&&d.splice(e,1);return R[f].tweens},$=function(a,b,c,d){var e,f,g=a.vars.onOverwrite;return g&&(e=g(a,b,c,d)),g=G.onOverwrite,g&&(f=g(a,b,c,d)),e!==!1&&f!==!1},_=function(a,b,c,d,e){var f,g,h,i;if(1===d||d>=4){for(i=e.length,f=0;i>f;f++)if((h=e[f])!==b)h._gc||h._kill(null,a,b)&&(g=!0);else if(5===d)break;return g}var j,k=b._startTime+m,l=[],n=0,o=0===b._duration;for(f=e.length;--f>-1;)(h=e[f])===b||h._gc||h._paused||(h._timeline!==b._timeline?(j=j||aa(b,0,o),0===aa(h,j,o)&&(l[n++]=h)):h._startTime<=k&&h._startTime+h.totalDuration()/h._timeScale>k&&((o||!h._initted)&&k-h._startTime<=2e-10||(l[n++]=h)));for(f=n;--f>-1;)if(h=l[f],2===d&&h._kill(c,a,b)&&(g=!0),2!==d||!h._firstPT&&h._initted){if(2!==d&&!$(h,b))continue;h._enabled(!1,!1)&&(g=!0)}return g},aa=function(a,b,c){for(var d=a._timeline,e=d._timeScale,f=a._startTime;d._timeline;){if(f+=d._startTime,e*=d._timeScale,d._paused)return-100;d=d._timeline}return f/=e,f>b?f-b:c&&f===b||!a._initted&&2*m>f-b?m:(f+=a.totalDuration()/a._timeScale/e)>b+m?0:f-b-m};h._init=function(){var a,b,c,d,e,f,g=this.vars,h=this._overwrittenProps,i=this._duration,j=!!g.immediateRender,k=g.ease;if(g.startAt){this._startAt&&(this._startAt.render(-1,!0),this._startAt.kill()),e={};for(d in g.startAt)e[d]=g.startAt[d];if(e.overwrite=!1,e.immediateRender=!0,e.lazy=j&&g.lazy!==!1,e.startAt=e.delay=null,this._startAt=G.to(this.target,0,e),j)if(this._time>0)this._startAt=null;else if(0!==i)return}else if(g.runBackwards&&0!==i)if(this._startAt)this._startAt.render(-1,!0),this._startAt.kill(),this._startAt=null;else{0!==this._time&&(j=!1),c={};for(d in g)T[d]&&"autoCSS"!==d||(c[d]=g[d]);if(c.overwrite=0,c.data="isFromStart",c.lazy=j&&g.lazy!==!1,c.immediateRender=j,this._startAt=G.to(this.target,0,c),j){if(0===this._time)return}else this._startAt._init(),this._startAt._enabled(!1),this.vars.immediateRender&&(this._startAt=null)}if(this._ease=k=k?k instanceof v?k:"function"==typeof k?new v(k,g.easeParams):w[k]||G.defaultEase:G.defaultEase,g.easeParams instanceof Array&&k.config&&(this._ease=k.config.apply(k,g.easeParams)),this._easeType=this._ease._type,this._easePower=this._ease._power,this._firstPT=null,this._targets)for(f=this._targets.length,a=0;f>a;a++)this._initProps(this._targets[a],this._propLookup[a]={},this._siblings[a],h?h[a]:null,a)&&(b=!0);else b=this._initProps(this.target,this._propLookup,this._siblings,h,0);if(b&&G._onPluginEvent("_onInitAllProps",this),h&&(this._firstPT||"function"!=typeof this.target&&this._enabled(!1,!1)),g.runBackwards)for(c=this._firstPT;c;)c.s+=c.c,c.c=-c.c,c=c._next;this._onUpdate=g.onUpdate,this._initted=!0},h._initProps=function(b,c,d,e,f){var g,h,i,j,k,l;if(null==b)return!1;K[b._gsTweenID]&&Y(),this.vars.css||b.style&&b!==a&&b.nodeType&&Q.css&&this.vars.autoCSS!==!1&&I(this.vars,b);for(g in this.vars)if(l=this.vars[g],T[g])l&&(l instanceof Array||l.push&&p(l))&&-1!==l.join("").indexOf("{self}")&&(this.vars[g]=l=this._swapSelfInParams(l,this));else if(Q[g]&&(j=new Q[g])._onInitTween(b,this.vars[g],this,f)){for(this._firstPT=k={_next:this._firstPT,t:j,p:"setRatio",s:0,c:1,f:1,n:g,pg:1,pr:j._priority,m:0},h=j._overwriteProps.length;--h>-1;)c[j._overwriteProps[h]]=this._firstPT;(j._priority||j._onInitAllProps)&&(i=!0),(j._onDisable||j._onEnable)&&(this._notifyPluginsOfEnabled=!0),k._next&&(k._next._prev=k)}else c[g]=O.call(this,b,g,"get",l,g,0,null,this.vars.stringFilter,f);return e&&this._kill(e,b)?this._initProps(b,c,d,e,f):this._overwrite>1&&this._firstPT&&d.length>1&&_(b,this,c,this._overwrite,d)?(this._kill(c,b),this._initProps(b,c,d,e,f)):(this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration)&&(K[b._gsTweenID]=!0),i)},h.render=function(a,b,c){var d,e,f,g,h=this._time,i=this._duration,j=this._rawPrevTime;if(a>=i-1e-7&&a>=0)this._totalTime=this._time=i,this.ratio=this._ease._calcEnd?this._ease.getRatio(1):1,this._reversed||(d=!0,e="onComplete",c=c||this._timeline.autoRemoveChildren),0===i&&(this._initted||!this.vars.lazy||c)&&(this._startTime===this._timeline._duration&&(a=0),(0>j||0>=a&&a>=-1e-7||j===m&&"isPause"!==this.data)&&j!==a&&(c=!0,j>m&&(e="onReverseComplete")),this._rawPrevTime=g=!b||a||j===a?a:m);else if(1e-7>a)this._totalTime=this._time=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0,(0!==h||0===i&&j>0)&&(e="onReverseComplete",d=this._reversed),0>a&&(this._active=!1,0===i&&(this._initted||!this.vars.lazy||c)&&(j>=0&&(j!==m||"isPause"!==this.data)&&(c=!0),this._rawPrevTime=g=!b||a||j===a?a:m)),this._initted||(c=!0);else if(this._totalTime=this._time=a,this._easeType){var k=a/i,l=this._easeType,n=this._easePower;(1===l||3===l&&k>=.5)&&(k=1-k),3===l&&(k*=2),1===n?k*=k:2===n?k*=k*k:3===n?k*=k*k*k:4===n&&(k*=k*k*k*k),1===l?this.ratio=1-k:2===l?this.ratio=k:.5>a/i?this.ratio=k/2:this.ratio=1-k/2}else this.ratio=this._ease.getRatio(a/i);if(this._time!==h||c){if(!this._initted){if(this._init(),!this._initted||this._gc)return;if(!c&&this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration))return this._time=this._totalTime=h,this._rawPrevTime=j,J.push(this),void(this._lazy=[a,b]);this._time&&!d?this.ratio=this._ease.getRatio(this._time/i):d&&this._ease._calcEnd&&(this.ratio=this._ease.getRatio(0===this._time?0:1))}for(this._lazy!==!1&&(this._lazy=!1),this._active||!this._paused&&this._time!==h&&a>=0&&(this._active=!0),0===h&&(this._startAt&&(a>=0?this._startAt.render(a,b,c):e||(e="_dummyGS")),this.vars.onStart&&(0!==this._time||0===i)&&(b||this._callback("onStart"))),f=this._firstPT;f;)f.f?f.t[f.p](f.c*this.ratio+f.s):f.t[f.p]=f.c*this.ratio+f.s,f=f._next;this._onUpdate&&(0>a&&this._startAt&&a!==-1e-4&&this._startAt.render(a,b,c),b||(this._time!==h||d||c)&&this._callback("onUpdate")),e&&(!this._gc||c)&&(0>a&&this._startAt&&!this._onUpdate&&a!==-1e-4&&this._startAt.render(a,b,c),d&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!b&&this.vars[e]&&this._callback(e),0===i&&this._rawPrevTime===m&&g!==m&&(this._rawPrevTime=0))}},h._kill=function(a,b,c){if("all"===a&&(a=null),null==a&&(null==b||b===this.target))return this._lazy=!1,this._enabled(!1,!1);b="string"!=typeof b?b||this._targets||this.target:G.selector(b)||b;var d,e,f,g,h,i,j,k,l,m=c&&this._time&&c._startTime===this._startTime&&this._timeline===c._timeline;if((p(b)||H(b))&&"number"!=typeof b[0])for(d=b.length;--d>-1;)this._kill(a,b[d],c)&&(i=!0);else{if(this._targets){for(d=this._targets.length;--d>-1;)if(b===this._targets[d]){h=this._propLookup[d]||{},this._overwrittenProps=this._overwrittenProps||[],e=this._overwrittenProps[d]=a?this._overwrittenProps[d]||{}:"all";break}}else{if(b!==this.target)return!1;h=this._propLookup,e=this._overwrittenProps=a?this._overwrittenProps||{}:"all"}if(h){if(j=a||h,k=a!==e&&"all"!==e&&a!==h&&("object"!=typeof a||!a._tempKill),c&&(G.onOverwrite||this.vars.onOverwrite)){for(f in j)h[f]&&(l||(l=[]),l.push(f));if((l||!a)&&!$(this,c,b,l))return!1}for(f in j)(g=h[f])&&(m&&(g.f?g.t[g.p](g.s):g.t[g.p]=g.s,i=!0),g.pg&&g.t._kill(j)&&(i=!0),g.pg&&0!==g.t._overwriteProps.length||(g._prev?g._prev._next=g._next:g===this._firstPT&&(this._firstPT=g._next),g._next&&(g._next._prev=g._prev),g._next=g._prev=null),delete h[f]),k&&(e[f]=1);!this._firstPT&&this._initted&&this._enabled(!1,!1)}}return i},h.invalidate=function(){return this._notifyPluginsOfEnabled&&G._onPluginEvent("_onDisable",this),this._firstPT=this._overwrittenProps=this._startAt=this._onUpdate=null,this._notifyPluginsOfEnabled=this._active=this._lazy=!1,this._propLookup=this._targets?{}:[],D.prototype.invalidate.call(this),this.vars.immediateRender&&(this._time=-m,this.render(Math.min(0,-this._delay))),this},h._enabled=function(a,b){if(j||i.wake(),a&&this._gc){var c,d=this._targets;if(d)for(c=d.length;--c>-1;)this._siblings[c]=Z(d[c],this,!0);else this._siblings=Z(this.target,this,!0)}return D.prototype._enabled.call(this,a,b),this._notifyPluginsOfEnabled&&this._firstPT?G._onPluginEvent(a?"_onEnable":"_onDisable",this):!1},G.to=function(a,b,c){return new G(a,b,c)},G.from=function(a,b,c){return c.runBackwards=!0,c.immediateRender=0!=c.immediateRender,new G(a,b,c)},G.fromTo=function(a,b,c,d){return d.startAt=c,d.immediateRender=0!=d.immediateRender&&0!=c.immediateRender,new G(a,b,d)},G.delayedCall=function(a,b,c,d,e){return new G(b,0,{delay:a,onComplete:b,onCompleteParams:c,callbackScope:d,onReverseComplete:b,onReverseCompleteParams:c,immediateRender:!1,lazy:!1,useFrames:e,overwrite:0})},G.set=function(a,b){return new G(a,0,b)},G.getTweensOf=function(a,b){if(null==a)return[];a="string"!=typeof a?a:G.selector(a)||a;var c,d,e,f;if((p(a)||H(a))&&"number"!=typeof a[0]){for(c=a.length,d=[];--c>-1;)d=d.concat(G.getTweensOf(a[c],b));for(c=d.length;--c>-1;)for(f=d[c],e=c;--e>-1;)f===d[e]&&d.splice(c,1)}else for(d=Z(a).concat(),c=d.length;--c>-1;)(d[c]._gc||b&&!d[c].isActive())&&d.splice(c,1);return d},G.killTweensOf=G.killDelayedCallsTo=function(a,b,c){"object"==typeof b&&(c=b,b=!1);for(var d=G.getTweensOf(a,b),e=d.length;--e>-1;)d[e]._kill(c,a)};var ba=t("plugins.TweenPlugin",function(a,b){this._overwriteProps=(a||"").split(","),this._propName=this._overwriteProps[0],this._priority=b||0,this._super=ba.prototype},!0);if(h=ba.prototype,ba.version="1.19.0",ba.API=2,h._firstPT=null,h._addTween=O,h.setRatio=M,h._kill=function(a){var b,c=this._overwriteProps,d=this._firstPT;if(null!=a[this._propName])this._overwriteProps=[];else for(b=c.length;--b>-1;)null!=a[c[b]]&&c.splice(b,1);for(;d;)null!=a[d.n]&&(d._next&&(d._next._prev=d._prev),d._prev?(d._prev._next=d._next,d._prev=null):this._firstPT===d&&(this._firstPT=d._next)),d=d._next;return!1},h._mod=h._roundProps=function(a){for(var b,c=this._firstPT;c;)b=a[this._propName]||null!=c.n&&a[c.n.split(this._propName+"_").join("")],b&&"function"==typeof b&&(2===c.f?c.t._applyPT.m=b:c.m=b),c=c._next},G._onPluginEvent=function(a,b){var c,d,e,f,g,h=b._firstPT;if("_onInitAllProps"===a){for(;h;){for(g=h._next,d=e;d&&d.pr>h.pr;)d=d._next;(h._prev=d?d._prev:f)?h._prev._next=h:e=h,(h._next=d)?d._prev=h:f=h,h=g}h=b._firstPT=e}for(;h;)h.pg&&"function"==typeof h.t[a]&&h.t[a]()&&(c=!0),h=h._next;return c},ba.activate=function(a){for(var b=a.length;--b>-1;)a[b].API===ba.API&&(Q[(new a[b])._propName]=a[b]);return!0},s.plugin=function(a){if(!(a&&a.propName&&a.init&&a.API))throw"illegal plugin definition.";var b,c=a.propName,d=a.priority||0,e=a.overwriteProps,f={init:"_onInitTween",set:"setRatio",kill:"_kill",round:"_mod",mod:"_mod",initAll:"_onInitAllProps"},g=t("plugins."+c.charAt(0).toUpperCase()+c.substr(1)+"Plugin",function(){ba.call(this,c,d),this._overwriteProps=e||[]},a.global===!0),h=g.prototype=new ba(c);h.constructor=g,g.API=a.API;for(b in f)"function"==typeof a[b]&&(h[f[b]]=a[b]);return g.version=a.version,ba.activate([g]),g},f=a._gsQueue){for(g=0;gt._rawPrevTime||0===t._rawPrevTime&&a._reversed,_=l?0:r,f=l?r:0;if(e||!this._forcingPlayhead){for(a.pause(h),n=t._prev;n&&n._startTime===h;)n._rawPrevTime=f,n=n._prev;for(n=t._next;n&&n._startTime===h;)n._rawPrevTime=_,n=n._next;e&&e.apply(s||a.vars.callbackScope||a,i||u),(this._forcingPlayhead||!a._paused)&&a.seek(o)}},m=function(t){var e,i=[],s=t.length;for(e=0;e!==s;i.push(t[e++]));return i},d=s.prototype=new e;return s.version="1.17.0",d.constructor=s,d.kill()._gc=d._forcingPlayhead=!1,d.to=function(t,e,s,r){var n=s.repeat&&f.TweenMax||i;return e?this.add(new n(t,e,s),r):this.set(t,s,r)},d.from=function(t,e,s,r){return this.add((s.repeat&&f.TweenMax||i).from(t,e,s),r)},d.fromTo=function(t,e,s,r,n){var a=r.repeat&&f.TweenMax||i;return e?this.add(a.fromTo(t,e,s,r),n):this.set(t,r,n)},d.staggerTo=function(t,e,r,n,a,h,l,_){var u,f=new s({onComplete:h,onCompleteParams:l,callbackScope:_,smoothChildTiming:this.smoothChildTiming});for("string"==typeof t&&(t=i.selector(t)||t),t=t||[],o(t)&&(t=m(t)),n=n||0,0>n&&(t=m(t),t.reverse(),n*=-1),u=0;t.length>u;u++)r.startAt&&(r.startAt=c(r.startAt)),f.to(t[u],e,c(r),u*n);return this.add(f,a)},d.staggerFrom=function(t,e,i,s,r,n,a,o){return i.immediateRender=0!=i.immediateRender,i.runBackwards=!0,this.staggerTo(t,e,i,s,r,n,a,o)},d.staggerFromTo=function(t,e,i,s,r,n,a,o,h){return s.startAt=i,s.immediateRender=0!=s.immediateRender&&0!=i.immediateRender,this.staggerTo(t,e,s,r,n,a,o,h)},d.call=function(t,e,s,r){return this.add(i.delayedCall(0,t,e,s),r)},d.set=function(t,e,s){return s=this._parseTimeOrLabel(s,0,!0),null==e.immediateRender&&(e.immediateRender=s===this._time&&!this._paused),this.add(new i(t,0,e),s)},s.exportRoot=function(t,e){t=t||{},null==t.smoothChildTiming&&(t.smoothChildTiming=!0);var r,n,a=new s(t),o=a._timeline;for(null==e&&(e=!0),o._remove(a,!0),a._startTime=0,a._rawPrevTime=a._time=a._totalTime=o._time,r=o._first;r;)n=r._next,e&&r instanceof i&&r.target===r.vars.onComplete||a.add(r,r._startTime-r._delay),r=n;return o.add(a,0),a},d.add=function(r,n,a,o){var l,_,u,f,c,p;if("number"!=typeof n&&(n=this._parseTimeOrLabel(n,0,!0,r)),!(r instanceof t)){if(r instanceof Array||r&&r.push&&h(r)){for(a=a||"normal",o=o||0,l=n,_=r.length,u=0;_>u;u++)h(f=r[u])&&(f=new s({tweens:f})),this.add(f,l),"string"!=typeof f&&"function"!=typeof f&&("sequence"===a?l=f._startTime+f.totalDuration()/f._timeScale:"start"===a&&(f._startTime-=f.delay())),l+=o;return this._uncache(!0)}if("string"==typeof r)return this.addLabel(r,n);if("function"!=typeof r)throw"Cannot add "+r+" into the timeline; it is not a tween, timeline, function, or string.";r=i.delayedCall(0,r)}if(e.prototype.add.call(this,r,n),(this._gc||this._time===this._duration)&&!this._paused&&this._durationr._startTime;c._timeline;)p&&c._timeline.smoothChildTiming?c.totalTime(c._totalTime,!0):c._gc&&c._enabled(!0,!1),c=c._timeline;return this},d.remove=function(e){if(e instanceof t)return this._remove(e,!1);if(e instanceof Array||e&&e.push&&h(e)){for(var i=e.length;--i>-1;)this.remove(e[i]);return this}return"string"==typeof e?this.removeLabel(e):this.kill(null,e)},d._remove=function(t,i){e.prototype._remove.call(this,t,i);var s=this._last;return s?this._time>s._startTime+s._totalDuration/s._timeScale&&(this._time=this.duration(),this._totalTime=this._totalDuration):this._time=this._totalTime=this._duration=this._totalDuration=0,this},d.append=function(t,e){return this.add(t,this._parseTimeOrLabel(null,e,!0,t))},d.insert=d.insertMultiple=function(t,e,i,s){return this.add(t,e||0,i,s)},d.appendMultiple=function(t,e,i,s){return this.add(t,this._parseTimeOrLabel(null,e,!0,t),i,s)},d.addLabel=function(t,e){return this._labels[t]=this._parseTimeOrLabel(e),this},d.addPause=function(t,e,s,r){var n=i.delayedCall(0,p,["{self}",e,s,r],this);return n.data="isPause",this.add(n,t)},d.removeLabel=function(t){return delete this._labels[t],this},d.getLabelTime=function(t){return null!=this._labels[t]?this._labels[t]:-1},d._parseTimeOrLabel=function(e,i,s,r){var n;if(r instanceof t&&r.timeline===this)this.remove(r);else if(r&&(r instanceof Array||r.push&&h(r)))for(n=r.length;--n>-1;)r[n]instanceof t&&r[n].timeline===this&&this.remove(r[n]);if("string"==typeof i)return this._parseTimeOrLabel(i,s&&"number"==typeof e&&null==this._labels[i]?e-this.duration():0,s);if(i=i||0,"string"!=typeof e||!isNaN(e)&&null==this._labels[e])null==e&&(e=this.duration());else{if(n=e.indexOf("="),-1===n)return null==this._labels[e]?s?this._labels[e]=this.duration()+i:i:this._labels[e]+i;i=parseInt(e.charAt(n-1)+"1",10)*Number(e.substr(n+1)),e=n>1?this._parseTimeOrLabel(e.substr(0,n-1),0,s):this.duration()}return Number(e)+i},d.seek=function(t,e){return this.totalTime("number"==typeof t?t:this._parseTimeOrLabel(t),e!==!1)},d.stop=function(){return this.paused(!0)},d.gotoAndPlay=function(t,e){return this.play(t,e)},d.gotoAndStop=function(t,e){return this.pause(t,e)},d.render=function(t,e,i){this._gc&&this._enabled(!0,!1);var s,n,a,o,h,u=this._dirty?this.totalDuration():this._totalDuration,f=this._time,c=this._startTime,p=this._timeScale,m=this._paused;if(t>=u)this._totalTime=this._time=u,this._reversed||this._hasPausedChild()||(n=!0,o="onComplete",h=!!this._timeline.autoRemoveChildren,0===this._duration&&(0===t||0>this._rawPrevTime||this._rawPrevTime===r)&&this._rawPrevTime!==t&&this._first&&(h=!0,this._rawPrevTime>r&&(o="onReverseComplete"))),this._rawPrevTime=this._duration||!e||t||this._rawPrevTime===t?t:r,t=u+1e-4;else if(1e-7>t)if(this._totalTime=this._time=0,(0!==f||0===this._duration&&this._rawPrevTime!==r&&(this._rawPrevTime>0||0>t&&this._rawPrevTime>=0))&&(o="onReverseComplete",n=this._reversed),0>t)this._active=!1,this._timeline.autoRemoveChildren&&this._reversed?(h=n=!0,o="onReverseComplete"):this._rawPrevTime>=0&&this._first&&(h=!0),this._rawPrevTime=t;else{if(this._rawPrevTime=this._duration||!e||t||this._rawPrevTime===t?t:r,0===t&&n)for(s=this._first;s&&0===s._startTime;)s._duration||(n=!1),s=s._next;t=0,this._initted||(h=!0)}else this._totalTime=this._time=this._rawPrevTime=t;if(this._time!==f&&this._first||i||h){if(this._initted||(this._initted=!0),this._active||!this._paused&&this._time!==f&&t>0&&(this._active=!0),0===f&&this.vars.onStart&&0!==this._time&&(e||this._callback("onStart")),this._time>=f)for(s=this._first;s&&(a=s._next,!this._paused||m);)(s._active||s._startTime<=this._time&&!s._paused&&!s._gc)&&(s._reversed?s.render((s._dirty?s.totalDuration():s._totalDuration)-(t-s._startTime)*s._timeScale,e,i):s.render((t-s._startTime)*s._timeScale,e,i)),s=a;else for(s=this._last;s&&(a=s._prev,!this._paused||m);)(s._active||f>=s._startTime&&!s._paused&&!s._gc)&&(s._reversed?s.render((s._dirty?s.totalDuration():s._totalDuration)-(t-s._startTime)*s._timeScale,e,i):s.render((t-s._startTime)*s._timeScale,e,i)),s=a;this._onUpdate&&(e||(l.length&&_(),this._callback("onUpdate"))),o&&(this._gc||(c===this._startTime||p!==this._timeScale)&&(0===this._time||u>=this.totalDuration())&&(n&&(l.length&&_(),this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!e&&this.vars[o]&&this._callback(o)))}},d._hasPausedChild=function(){for(var t=this._first;t;){if(t._paused||t instanceof s&&t._hasPausedChild())return!0;t=t._next}return!1},d.getChildren=function(t,e,s,r){r=r||-9999999999;for(var n=[],a=this._first,o=0;a;)r>a._startTime||(a instanceof i?e!==!1&&(n[o++]=a):(s!==!1&&(n[o++]=a),t!==!1&&(n=n.concat(a.getChildren(!0,e,s)),o=n.length))),a=a._next;return n},d.getTweensOf=function(t,e){var s,r,n=this._gc,a=[],o=0;for(n&&this._enabled(!0,!0),s=i.getTweensOf(t),r=s.length;--r>-1;)(s[r].timeline===this||e&&this._contains(s[r]))&&(a[o++]=s[r]);return n&&this._enabled(!1,!0),a},d.recent=function(){return this._recent},d._contains=function(t){for(var e=t.timeline;e;){if(e===this)return!0;e=e.timeline}return!1},d.shiftChildren=function(t,e,i){i=i||0;for(var s,r=this._first,n=this._labels;r;)r._startTime>=i&&(r._startTime+=t),r=r._next;if(e)for(s in n)n[s]>=i&&(n[s]+=t);return this._uncache(!0)},d._kill=function(t,e){if(!t&&!e)return this._enabled(!1,!1);for(var i=e?this.getTweensOf(e):this.getChildren(!0,!0,!1),s=i.length,r=!1;--s>-1;)i[s]._kill(t,e)&&(r=!0);return r},d.clear=function(t){var e=this.getChildren(!1,!0,!0),i=e.length;for(this._time=this._totalTime=0;--i>-1;)e[i]._enabled(!1,!1);return t!==!1&&(this._labels={}),this._uncache(!0)},d.invalidate=function(){for(var e=this._first;e;)e.invalidate(),e=e._next;return t.prototype.invalidate.call(this)},d._enabled=function(t,i){if(t===this._gc)for(var s=this._first;s;)s._enabled(t,!0),s=s._next;return e.prototype._enabled.call(this,t,i)},d.totalTime=function(){this._forcingPlayhead=!0;var e=t.prototype.totalTime.apply(this,arguments);return this._forcingPlayhead=!1,e},d.duration=function(t){return arguments.length?(0!==this.duration()&&0!==t&&this.timeScale(this._duration/t),this):(this._dirty&&this.totalDuration(),this._duration)},d.totalDuration=function(t){if(!arguments.length){if(this._dirty){for(var e,i,s=0,r=this._last,n=999999999999;r;)e=r._prev,r._dirty&&r.totalDuration(),r._startTime>n&&this._sortChildren&&!r._paused?this.add(r,r._startTime-r._delay):n=r._startTime,0>r._startTime&&!r._paused&&(s-=r._startTime,this._timeline.smoothChildTiming&&(this._startTime+=r._startTime/this._timeScale),this.shiftChildren(-r._startTime,!1,-9999999999),n=0),i=r._startTime+r._totalDuration/r._timeScale,i>s&&(s=i),r=e;this._duration=this._totalDuration=s,this._dirty=!1}return this._totalDuration}return 0!==this.totalDuration()&&0!==t&&this.timeScale(this._totalDuration/t),this},d.paused=function(e){if(!e)for(var i=this._first,s=this._time;i;)i._startTime===s&&"isPause"===i.data&&(i._rawPrevTime=0),i=i._next;return t.prototype.paused.apply(this,arguments)},d.usesFrames=function(){for(var e=this._timeline;e._timeline;)e=e._timeline;return e===t._rootFramesTimeline},d.rawTime=function(){return this._paused?this._totalTime:(this._timeline.rawTime()-this._startTime)*this._timeScale},s},!0)}),_gsScope._gsDefine&&_gsScope._gsQueue.pop()(),function(t){"use strict";var e=function(){return(_gsScope.GreenSockGlobals||_gsScope)[t]};"function"==typeof define&&define.amd?define(["TweenLite"],e):"undefined"!=typeof module&&module.exports&&(require("./TweenLite.js"),module.exports=e())}("TimelineLite"); /* EASING PLUGIN*/ /*! * VERSION: 1.15.5 * DATE: 2016-07-08 * UPDATES AND DOCS AT: http://greensock.com * * @license Copyright (c) 2008-2016, GreenSock. All rights reserved. * This work is subject to the terms at http://greensock.com/standard-license or for * Club GreenSock members, the software agreement that was issued with your membership. * * @author: Jack Doyle, jack@greensock.com **/ var _gsScope="undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window;(_gsScope._gsQueue||(_gsScope._gsQueue=[])).push(function(){"use strict";_gsScope._gsDefine("easing.Back",["easing.Ease"],function(a){var b,c,d,e=_gsScope.GreenSockGlobals||_gsScope,f=e.com.greensock,g=2*Math.PI,h=Math.PI/2,i=f._class,j=function(b,c){var d=i("easing."+b,function(){},!0),e=d.prototype=new a;return e.constructor=d,e.getRatio=c,d},k=a.register||function(){},l=function(a,b,c,d,e){var f=i("easing."+a,{easeOut:new b,easeIn:new c,easeInOut:new d},!0);return k(f,a),f},m=function(a,b,c){this.t=a,this.v=b,c&&(this.next=c,c.prev=this,this.c=c.v-b,this.gap=c.t-a)},n=function(b,c){var d=i("easing."+b,function(a){this._p1=a||0===a?a:1.70158,this._p2=1.525*this._p1},!0),e=d.prototype=new a;return e.constructor=d,e.getRatio=c,e.config=function(a){return new d(a)},d},o=l("Back",n("BackOut",function(a){return(a-=1)*a*((this._p1+1)*a+this._p1)+1}),n("BackIn",function(a){return a*a*((this._p1+1)*a-this._p1)}),n("BackInOut",function(a){return(a*=2)<1?.5*a*a*((this._p2+1)*a-this._p2):.5*((a-=2)*a*((this._p2+1)*a+this._p2)+2)})),p=i("easing.SlowMo",function(a,b,c){b=b||0===b?b:.7,null==a?a=.7:a>1&&(a=1),this._p=1!==a?b:0,this._p1=(1-a)/2,this._p2=a,this._p3=this._p1+this._p2,this._calcEnd=c===!0},!0),q=p.prototype=new a;return q.constructor=p,q.getRatio=function(a){var b=a+(.5-a)*this._p;return athis._p3?this._calcEnd?1-(a=(a-this._p3)/this._p1)*a:b+(a-b)*(a=(a-this._p3)/this._p1)*a*a*a:this._calcEnd?1:b},p.ease=new p(.7,.7),q.config=p.config=function(a,b,c){return new p(a,b,c)},b=i("easing.SteppedEase",function(a){a=a||1,this._p1=1/a,this._p2=a+1},!0),q=b.prototype=new a,q.constructor=b,q.getRatio=function(a){return 0>a?a=0:a>=1&&(a=.999999999),(this._p2*a>>0)*this._p1},q.config=b.config=function(a){return new b(a)},c=i("easing.RoughEase",function(b){b=b||{};for(var c,d,e,f,g,h,i=b.taper||"none",j=[],k=0,l=0|(b.points||20),n=l,o=b.randomize!==!1,p=b.clamp===!0,q=b.template instanceof a?b.template:null,r="number"==typeof b.strength?.4*b.strength:.4;--n>-1;)c=o?Math.random():1/l*n,d=q?q.getRatio(c):c,"none"===i?e=r:"out"===i?(f=1-c,e=f*f*r):"in"===i?e=c*c*r:.5>c?(f=2*c,e=f*f*.5*r):(f=2*(1-c),e=f*f*.5*r),o?d+=Math.random()*e-.5*e:n%2?d+=.5*e:d-=.5*e,p&&(d>1?d=1:0>d&&(d=0)),j[k++]={x:c,y:d};for(j.sort(function(a,b){return a.x-b.x}),h=new m(1,1,null),n=l;--n>-1;)g=j[n],h=new m(g.x,g.y,h);this._prev=new m(0,0,0!==h.t?h:h.next)},!0),q=c.prototype=new a,q.constructor=c,q.getRatio=function(a){var b=this._prev;if(a>b.t){for(;b.next&&a>=b.t;)b=b.next;b=b.prev}else for(;b.prev&&a<=b.t;)b=b.prev;return this._prev=b,b.v+(a-b.t)/b.gap*b.c},q.config=function(a){return new c(a)},c.ease=new c,l("Bounce",j("BounceOut",function(a){return 1/2.75>a?7.5625*a*a:2/2.75>a?7.5625*(a-=1.5/2.75)*a+.75:2.5/2.75>a?7.5625*(a-=2.25/2.75)*a+.9375:7.5625*(a-=2.625/2.75)*a+.984375}),j("BounceIn",function(a){return(a=1-a)<1/2.75?1-7.5625*a*a:2/2.75>a?1-(7.5625*(a-=1.5/2.75)*a+.75):2.5/2.75>a?1-(7.5625*(a-=2.25/2.75)*a+.9375):1-(7.5625*(a-=2.625/2.75)*a+.984375)}),j("BounceInOut",function(a){var b=.5>a;return a=b?1-2*a:2*a-1,a=1/2.75>a?7.5625*a*a:2/2.75>a?7.5625*(a-=1.5/2.75)*a+.75:2.5/2.75>a?7.5625*(a-=2.25/2.75)*a+.9375:7.5625*(a-=2.625/2.75)*a+.984375,b?.5*(1-a):.5*a+.5})),l("Circ",j("CircOut",function(a){return Math.sqrt(1-(a-=1)*a)}),j("CircIn",function(a){return-(Math.sqrt(1-a*a)-1)}),j("CircInOut",function(a){return(a*=2)<1?-.5*(Math.sqrt(1-a*a)-1):.5*(Math.sqrt(1-(a-=2)*a)+1)})),d=function(b,c,d){var e=i("easing."+b,function(a,b){this._p1=a>=1?a:1,this._p2=(b||d)/(1>a?a:1),this._p3=this._p2/g*(Math.asin(1/this._p1)||0),this._p2=g/this._p2},!0),f=e.prototype=new a;return f.constructor=e,f.getRatio=c,f.config=function(a,b){return new e(a,b)},e},l("Elastic",d("ElasticOut",function(a){return this._p1*Math.pow(2,-10*a)*Math.sin((a-this._p3)*this._p2)+1},.3),d("ElasticIn",function(a){return-(this._p1*Math.pow(2,10*(a-=1))*Math.sin((a-this._p3)*this._p2))},.3),d("ElasticInOut",function(a){return(a*=2)<1?-.5*(this._p1*Math.pow(2,10*(a-=1))*Math.sin((a-this._p3)*this._p2)):this._p1*Math.pow(2,-10*(a-=1))*Math.sin((a-this._p3)*this._p2)*.5+1},.45)),l("Expo",j("ExpoOut",function(a){return 1-Math.pow(2,-10*a)}),j("ExpoIn",function(a){return Math.pow(2,10*(a-1))-.001}),j("ExpoInOut",function(a){return(a*=2)<1?.5*Math.pow(2,10*(a-1)):.5*(2-Math.pow(2,-10*(a-1)))})),l("Sine",j("SineOut",function(a){return Math.sin(a*h)}),j("SineIn",function(a){return-Math.cos(a*h)+1}),j("SineInOut",function(a){return-.5*(Math.cos(Math.PI*a)-1)})),i("easing.EaseLookup",{find:function(b){return a.map[b]}},!0),k(e.SlowMo,"SlowMo","ease,"),k(c,"RoughEase","ease,"),k(b,"SteppedEase","ease,"),o},!0)}),_gsScope._gsDefine&&_gsScope._gsQueue.pop()(),function(){"use strict";var a=function(){return _gsScope.GreenSockGlobals||_gsScope};"function"==typeof define&&define.amd?define(["TweenLite"],a):"undefined"!=typeof module&&module.exports&&(require("../TweenLite.js"),module.exports=a())}(); /* CSS PLUGIN */ /*! * VERSION: 1.19.1 * DATE: 2017-01-17 * UPDATES AND DOCS AT: http://greensock.com * * @license Copyright (c) 2008-2017, GreenSock. All rights reserved. * This work is subject to the terms at http://greensock.com/standard-license or for * Club GreenSock members, the software agreement that was issued with your membership. * * @author: Jack Doyle, jack@greensock.com */ var _gsScope="undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window;(_gsScope._gsQueue||(_gsScope._gsQueue=[])).push(function(){"use strict";_gsScope._gsDefine("plugins.CSSPlugin",["plugins.TweenPlugin","TweenLite"],function(a,b){var c,d,e,f,g=function(){a.call(this,"css"),this._overwriteProps.length=0,this.setRatio=g.prototype.setRatio},h=_gsScope._gsDefine.globals,i={},j=g.prototype=new a("css");j.constructor=g,g.version="1.19.1",g.API=2,g.defaultTransformPerspective=0,g.defaultSkewType="compensated",g.defaultSmoothOrigin=!0,j="px",g.suffixMap={top:j,right:j,bottom:j,left:j,width:j,height:j,fontSize:j,padding:j,margin:j,perspective:j,lineHeight:""};var k,l,m,n,o,p,q,r,s=/(?:\-|\.|\b)(\d|\.|e\-)+/g,t=/(?:\d|\-\d|\.\d|\-\.\d|\+=\d|\-=\d|\+=.\d|\-=\.\d)+/g,u=/(?:\+=|\-=|\-|\b)[\d\-\.]+[a-zA-Z0-9]*(?:%|\b)/gi,v=/(?![+-]?\d*\.?\d+|[+-]|e[+-]\d+)[^0-9]/g,w=/(?:\d|\-|\+|=|#|\.)*/g,x=/opacity *= *([^)]*)/i,y=/opacity:([^;]*)/i,z=/alpha\(opacity *=.+?\)/i,A=/^(rgb|hsl)/,B=/([A-Z])/g,C=/-([a-z])/gi,D=/(^(?:url\(\"|url\())|(?:(\"\))$|\)$)/gi,E=function(a,b){return b.toUpperCase()},F=/(?:Left|Right|Width)/i,G=/(M11|M12|M21|M22)=[\d\-\.e]+/gi,H=/progid\:DXImageTransform\.Microsoft\.Matrix\(.+?\)/i,I=/,(?=[^\)]*(?:\(|$))/gi,J=/[\s,\(]/i,K=Math.PI/180,L=180/Math.PI,M={},N={style:{}},O=_gsScope.document||{createElement:function(){return N}},P=function(a,b){return O.createElementNS?O.createElementNS(b||"http://www.w3.org/1999/xhtml",a):O.createElement(a)},Q=P("div"),R=P("img"),S=g._internals={_specialProps:i},T=(_gsScope.navigator||{}).userAgent||"",U=function(){var a=T.indexOf("Android"),b=P("a");return m=-1!==T.indexOf("Safari")&&-1===T.indexOf("Chrome")&&(-1===a||parseFloat(T.substr(a+8,2))>3),o=m&&parseFloat(T.substr(T.indexOf("Version/")+8,2))<6,n=-1!==T.indexOf("Firefox"),(/MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(T)||/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(T))&&(p=parseFloat(RegExp.$1)),b?(b.style.cssText="top:1px;opacity:.55;",/^0.55/.test(b.style.opacity)):!1}(),V=function(a){return x.test("string"==typeof a?a:(a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100:1},W=function(a){_gsScope.console&&console.log(a)},X="",Y="",Z=function(a,b){b=b||Q;var c,d,e=b.style;if(void 0!==e[a])return a;for(a=a.charAt(0).toUpperCase()+a.substr(1),c=["O","Moz","ms","Ms","Webkit"],d=5;--d>-1&&void 0===e[c[d]+a];);return d>=0?(Y=3===d?"ms":c[d],X="-"+Y.toLowerCase()+"-",Y+a):null},$=O.defaultView?O.defaultView.getComputedStyle:function(){},_=g.getStyle=function(a,b,c,d,e){var f;return U||"opacity"!==b?(!d&&a.style[b]?f=a.style[b]:(c=c||$(a))?f=c[b]||c.getPropertyValue(b)||c.getPropertyValue(b.replace(B,"-$1").toLowerCase()):a.currentStyle&&(f=a.currentStyle[b]),null==e||f&&"none"!==f&&"auto"!==f&&"auto auto"!==f?f:e):V(a)},aa=S.convertToPixels=function(a,c,d,e,f){if("px"===e||!e)return d;if("auto"===e||!d)return 0;var h,i,j,k=F.test(c),l=a,m=Q.style,n=0>d,o=1===d;if(n&&(d=-d),o&&(d*=100),"%"===e&&-1!==c.indexOf("border"))h=d/100*(k?a.clientWidth:a.clientHeight);else{if(m.cssText="border:0 solid red;position:"+_(a,"position")+";line-height:0;","%"!==e&&l.appendChild&&"v"!==e.charAt(0)&&"rem"!==e)m[k?"borderLeftWidth":"borderTopWidth"]=d+e;else{if(l=a.parentNode||O.body,i=l._gsCache,j=b.ticker.frame,i&&k&&i.time===j)return i.width*d/100;m[k?"width":"height"]=d+e}l.appendChild(Q),h=parseFloat(Q[k?"offsetWidth":"offsetHeight"]),l.removeChild(Q),k&&"%"===e&&g.cacheWidths!==!1&&(i=l._gsCache=l._gsCache||{},i.time=j,i.width=h/d*100),0!==h||f||(h=aa(a,c,d,e,!0))}return o&&(h/=100),n?-h:h},ba=S.calculateOffset=function(a,b,c){if("absolute"!==_(a,"position",c))return 0;var d="left"===b?"Left":"Top",e=_(a,"margin"+d,c);return a["offset"+d]-(aa(a,b,parseFloat(e),e.replace(w,""))||0)},ca=function(a,b){var c,d,e,f={};if(b=b||$(a,null))if(c=b.length)for(;--c>-1;)e=b[c],(-1===e.indexOf("-transform")||Da===e)&&(f[e.replace(C,E)]=b.getPropertyValue(e));else for(c in b)(-1===c.indexOf("Transform")||Ca===c)&&(f[c]=b[c]);else if(b=a.currentStyle||a.style)for(c in b)"string"==typeof c&&void 0===f[c]&&(f[c.replace(C,E)]=b[c]);return U||(f.opacity=V(a)),d=Ra(a,b,!1),f.rotation=d.rotation,f.skewX=d.skewX,f.scaleX=d.scaleX,f.scaleY=d.scaleY,f.x=d.x,f.y=d.y,Fa&&(f.z=d.z,f.rotationX=d.rotationX,f.rotationY=d.rotationY,f.scaleZ=d.scaleZ),f.filters&&delete f.filters,f},da=function(a,b,c,d,e){var f,g,h,i={},j=a.style;for(g in c)"cssText"!==g&&"length"!==g&&isNaN(g)&&(b[g]!==(f=c[g])||e&&e[g])&&-1===g.indexOf("Origin")&&("number"==typeof f||"string"==typeof f)&&(i[g]="auto"!==f||"left"!==g&&"top"!==g?""!==f&&"auto"!==f&&"none"!==f||"string"!=typeof b[g]||""===b[g].replace(v,"")?f:0:ba(a,g),void 0!==j[g]&&(h=new sa(j,g,j[g],h)));if(d)for(g in d)"className"!==g&&(i[g]=d[g]);return{difs:i,firstMPT:h}},ea={width:["Left","Right"],height:["Top","Bottom"]},fa=["marginLeft","marginRight","marginTop","marginBottom"],ga=function(a,b,c){if("svg"===(a.nodeName+"").toLowerCase())return(c||$(a))[b]||0;if(a.getCTM&&Oa(a))return a.getBBox()[b]||0;var d=parseFloat("width"===b?a.offsetWidth:a.offsetHeight),e=ea[b],f=e.length;for(c=c||$(a,null);--f>-1;)d-=parseFloat(_(a,"padding"+e[f],c,!0))||0,d-=parseFloat(_(a,"border"+e[f]+"Width",c,!0))||0;return d},ha=function(a,b){if("contain"===a||"auto"===a||"auto auto"===a)return a+" ";(null==a||""===a)&&(a="0 0");var c,d=a.split(" "),e=-1!==a.indexOf("left")?"0%":-1!==a.indexOf("right")?"100%":d[0],f=-1!==a.indexOf("top")?"0%":-1!==a.indexOf("bottom")?"100%":d[1];if(d.length>3&&!b){for(d=a.split(", ").join(",").split(","),a=[],c=0;c2?" "+d[2]:""),b&&(b.oxp=-1!==e.indexOf("%"),b.oyp=-1!==f.indexOf("%"),b.oxr="="===e.charAt(1),b.oyr="="===f.charAt(1),b.ox=parseFloat(e.replace(v,"")),b.oy=parseFloat(f.replace(v,"")),b.v=a),b||a},ia=function(a,b){return"function"==typeof a&&(a=a(r,q)),"string"==typeof a&&"="===a.charAt(1)?parseInt(a.charAt(0)+"1",10)*parseFloat(a.substr(2)):parseFloat(a)-parseFloat(b)||0},ja=function(a,b){return"function"==typeof a&&(a=a(r,q)),null==a?b:"string"==typeof a&&"="===a.charAt(1)?parseInt(a.charAt(0)+"1",10)*parseFloat(a.substr(2))+b:parseFloat(a)||0},ka=function(a,b,c,d){var e,f,g,h,i,j=1e-6;return"function"==typeof a&&(a=a(r,q)),null==a?h=b:"number"==typeof a?h=a:(e=360,f=a.split("_"),i="="===a.charAt(1),g=(i?parseInt(a.charAt(0)+"1",10)*parseFloat(f[0].substr(2)):parseFloat(f[0]))*(-1===a.indexOf("rad")?1:L)-(i?0:b),f.length&&(d&&(d[c]=b+g),-1!==a.indexOf("short")&&(g%=e,g!==g%(e/2)&&(g=0>g?g+e:g-e)),-1!==a.indexOf("_cw")&&0>g?g=(g+9999999999*e)%e-(g/e|0)*e:-1!==a.indexOf("ccw")&&g>0&&(g=(g-9999999999*e)%e-(g/e|0)*e)),h=b+g),j>h&&h>-j&&(h=0),h},la={aqua:[0,255,255],lime:[0,255,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,255],navy:[0,0,128],white:[255,255,255],fuchsia:[255,0,255],olive:[128,128,0],yellow:[255,255,0],orange:[255,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[255,0,0],pink:[255,192,203],cyan:[0,255,255],transparent:[255,255,255,0]},ma=function(a,b,c){return a=0>a?a+1:a>1?a-1:a,255*(1>6*a?b+(c-b)*a*6:.5>a?c:2>3*a?b+(c-b)*(2/3-a)*6:b)+.5|0},na=g.parseColor=function(a,b){var c,d,e,f,g,h,i,j,k,l,m;if(a)if("number"==typeof a)c=[a>>16,a>>8&255,255&a];else{if(","===a.charAt(a.length-1)&&(a=a.substr(0,a.length-1)),la[a])c=la[a];else if("#"===a.charAt(0))4===a.length&&(d=a.charAt(1),e=a.charAt(2),f=a.charAt(3),a="#"+d+d+e+e+f+f),a=parseInt(a.substr(1),16),c=[a>>16,a>>8&255,255&a];else if("hsl"===a.substr(0,3))if(c=m=a.match(s),b){if(-1!==a.indexOf("="))return a.match(t)}else g=Number(c[0])%360/360,h=Number(c[1])/100,i=Number(c[2])/100,e=.5>=i?i*(h+1):i+h-i*h,d=2*i-e,c.length>3&&(c[3]=Number(a[3])),c[0]=ma(g+1/3,d,e),c[1]=ma(g,d,e),c[2]=ma(g-1/3,d,e);else c=a.match(s)||la.transparent;c[0]=Number(c[0]),c[1]=Number(c[1]),c[2]=Number(c[2]),c.length>3&&(c[3]=Number(c[3]))}else c=la.black;return b&&!m&&(d=c[0]/255,e=c[1]/255,f=c[2]/255,j=Math.max(d,e,f),k=Math.min(d,e,f),i=(j+k)/2,j===k?g=h=0:(l=j-k,h=i>.5?l/(2-j-k):l/(j+k),g=j===d?(e-f)/l+(f>e?6:0):j===e?(f-d)/l+2:(d-e)/l+4,g*=60),c[0]=g+.5|0,c[1]=100*h+.5|0,c[2]=100*i+.5|0),c},oa=function(a,b){var c,d,e,f=a.match(pa)||[],g=0,h=f.length?"":a;for(c=0;c0?g[0].replace(s,""):"";return k?e=b?function(a){var b,m,n,o;if("number"==typeof a)a+=l;else if(d&&I.test(a)){for(o=a.replace(I,"|").split("|"),n=0;nn--)for(;++nm--)for(;++mi;i++)h[a[i]]=j[i]=j[i]||j[(i-1)/2>>0];return e.parse(b,h,f,g)}},sa=(S._setPluginRatio=function(a){this.plugin.setRatio(a);for(var b,c,d,e,f,g=this.data,h=g.proxy,i=g.firstMPT,j=1e-6;i;)b=h[i.v],i.r?b=Math.round(b):j>b&&b>-j&&(b=0),i.t[i.p]=b,i=i._next;if(g.autoRotate&&(g.autoRotate.rotation=g.mod?g.mod(h.rotation,this.t):h.rotation),1===a||0===a)for(i=g.firstMPT,f=1===a?"e":"b";i;){if(c=i.t,c.type){if(1===c.type){for(e=c.xs0+c.s+c.xs1,d=1;d0;)i="xn"+g,h=d.p+"_"+i,n[h]=d.data[i],m[h]=d[i],f||(j=new sa(d,i,h,j,d.rxp[i]));d=d._next}return{proxy:m,end:n,firstMPT:j,pt:k}},S.CSSPropTween=function(a,b,d,e,g,h,i,j,k,l,m){this.t=a,this.p=b,this.s=d,this.c=e,this.n=i||b,a instanceof ta||f.push(this.n),this.r=j,this.type=h||0,k&&(this.pr=k,c=!0),this.b=void 0===l?d:l,this.e=void 0===m?d+e:m,g&&(this._next=g,g._prev=this)}),ua=function(a,b,c,d,e,f){var g=new ta(a,b,c,d-c,e,-1,f);return g.b=c,g.e=g.xs0=d,g},va=g.parseComplex=function(a,b,c,d,e,f,h,i,j,l){c=c||f||"","function"==typeof d&&(d=d(r,q)),h=new ta(a,b,0,0,h,l?2:1,null,!1,i,c,d),d+="",e&&pa.test(d+c)&&(d=[c,d],g.colorStringFilter(d),c=d[0],d=d[1]);var m,n,o,p,u,v,w,x,y,z,A,B,C,D=c.split(", ").join(",").split(" "),E=d.split(", ").join(",").split(" "),F=D.length,G=k!==!1;for((-1!==d.indexOf(",")||-1!==c.indexOf(","))&&(D=D.join(" ").replace(I,", ").split(" "),E=E.join(" ").replace(I,", ").split(" "),F=D.length),F!==E.length&&(D=(f||"").split(" "),F=D.length),h.plugin=j,h.setRatio=l,pa.lastIndex=0,m=0;F>m;m++)if(p=D[m],u=E[m],x=parseFloat(p),x||0===x)h.appendXtra("",x,ia(u,x),u.replace(t,""),G&&-1!==u.indexOf("px"),!0);else if(e&&pa.test(p))B=u.indexOf(")")+1,B=")"+(B?u.substr(B):""),C=-1!==u.indexOf("hsl")&&U,p=na(p,C),u=na(u,C),y=p.length+u.length>6,y&&!U&&0===u[3]?(h["xs"+h.l]+=h.l?" transparent":"transparent",h.e=h.e.split(E[m]).join("transparent")):(U||(y=!1),C?h.appendXtra(y?"hsla(":"hsl(",p[0],ia(u[0],p[0]),",",!1,!0).appendXtra("",p[1],ia(u[1],p[1]),"%,",!1).appendXtra("",p[2],ia(u[2],p[2]),y?"%,":"%"+B,!1):h.appendXtra(y?"rgba(":"rgb(",p[0],u[0]-p[0],",",!0,!0).appendXtra("",p[1],u[1]-p[1],",",!0).appendXtra("",p[2],u[2]-p[2],y?",":B,!0),y&&(p=p.length<4?1:p[3],h.appendXtra("",p,(u.length<4?1:u[3])-p,B,!1))),pa.lastIndex=0;else if(v=p.match(s)){if(w=u.match(t),!w||w.length!==v.length)return h;for(o=0,n=0;n0;)j["xn"+wa]=0,j["xs"+wa]="";j.xs0="",j._next=j._prev=j.xfirst=j.data=j.plugin=j.setRatio=j.rxp=null,j.appendXtra=function(a,b,c,d,e,f){var g=this,h=g.l;return g["xs"+h]+=f&&(h||g["xs"+h])?" "+a:a||"",c||0===h||g.plugin?(g.l++,g.type=g.setRatio?2:1,g["xs"+g.l]=d||"",h>0?(g.data["xn"+h]=b+c,g.rxp["xn"+h]=e,g["xn"+h]=b,g.plugin||(g.xfirst=new ta(g,"xn"+h,b,c,g.xfirst||g,0,g.n,e,g.pr),g.xfirst.xs0=0),g):(g.data={s:b+c},g.rxp={},g.s=b,g.c=c,g.r=e,g)):(g["xs"+h]+=b+(d||""),g)};var xa=function(a,b){b=b||{},this.p=b.prefix?Z(a)||a:a,i[a]=i[this.p]=this,this.format=b.formatter||qa(b.defaultValue,b.color,b.collapsible,b.multi),b.parser&&(this.parse=b.parser),this.clrs=b.color,this.multi=b.multi,this.keyword=b.keyword,this.dflt=b.defaultValue,this.pr=b.priority||0},ya=S._registerComplexSpecialProp=function(a,b,c){"object"!=typeof b&&(b={parser:c});var d,e,f=a.split(","),g=b.defaultValue;for(c=c||[g],d=0;dh.length?i.length:h.length,g=0;j>g;g++)b=h[g]=h[g]||this.dflt,c=i[g]=i[g]||this.dflt,m&&(k=b.indexOf(m),l=c.indexOf(m),k!==l&&(-1===l?h[g]=h[g].split(m).join(""):-1===k&&(h[g]+=" "+m)));b=h.join(", "),c=i.join(", ")}return va(a,this.p,b,c,this.clrs,this.dflt,d,this.pr,e,f)},j.parse=function(a,b,c,d,f,g,h){return this.parseComplex(a.style,this.format(_(a,this.p,e,!1,this.dflt)),this.format(b),f,g)},g.registerSpecialProp=function(a,b,c){ya(a,{parser:function(a,d,e,f,g,h,i){var j=new ta(a,e,0,0,g,2,e,!1,c);return j.plugin=h,j.setRatio=b(a,d,f._tween,e),j},priority:c})},g.useSVGTransformAttr=!0;var Aa,Ba="scaleX,scaleY,scaleZ,x,y,z,skewX,skewY,rotation,rotationX,rotationY,perspective,xPercent,yPercent".split(","),Ca=Z("transform"),Da=X+"transform",Ea=Z("transformOrigin"),Fa=null!==Z("perspective"),Ga=S.Transform=function(){this.perspective=parseFloat(g.defaultTransformPerspective)||0,this.force3D=g.defaultForce3D!==!1&&Fa?g.defaultForce3D||"auto":!1},Ha=_gsScope.SVGElement,Ia=function(a,b,c){var d,e=O.createElementNS("http://www.w3.org/2000/svg",a),f=/([a-z])([A-Z])/g;for(d in c)e.setAttributeNS(null,d.replace(f,"$1-$2").toLowerCase(),c[d]);return b.appendChild(e),e},Ja=O.documentElement||{},Ka=function(){var a,b,c,d=p||/Android/i.test(T)&&!_gsScope.chrome;return O.createElementNS&&!d&&(a=Ia("svg",Ja),b=Ia("rect",a,{width:100,height:50,x:100}),c=b.getBoundingClientRect().width,b.style[Ea]="50% 50%",b.style[Ca]="scaleX(0.5)",d=c===b.getBoundingClientRect().width&&!(n&&Fa),Ja.removeChild(a)),d}(),La=function(a,b,c,d,e,f){var h,i,j,k,l,m,n,o,p,q,r,s,t,u,v=a._gsTransform,w=Qa(a,!0);v&&(t=v.xOrigin,u=v.yOrigin),(!d||(h=d.split(" ")).length<2)&&(n=a.getBBox(),0===n.x&&0===n.y&&n.width+n.height===0&&(n={x:parseFloat(a.hasAttribute("x")?a.getAttribute("x"):a.hasAttribute("cx")?a.getAttribute("cx"):0)||0,y:parseFloat(a.hasAttribute("y")?a.getAttribute("y"):a.hasAttribute("cy")?a.getAttribute("cy"):0)||0,width:0,height:0}),b=ha(b).split(" "),h=[(-1!==b[0].indexOf("%")?parseFloat(b[0])/100*n.width:parseFloat(b[0]))+n.x,(-1!==b[1].indexOf("%")?parseFloat(b[1])/100*n.height:parseFloat(b[1]))+n.y]),c.xOrigin=k=parseFloat(h[0]),c.yOrigin=l=parseFloat(h[1]),d&&w!==Pa&&(m=w[0],n=w[1],o=w[2],p=w[3],q=w[4],r=w[5],s=m*p-n*o,s&&(i=k*(p/s)+l*(-o/s)+(o*r-p*q)/s,j=k*(-n/s)+l*(m/s)-(m*r-n*q)/s,k=c.xOrigin=h[0]=i,l=c.yOrigin=h[1]=j)),v&&(f&&(c.xOffset=v.xOffset,c.yOffset=v.yOffset,v=c),e||e!==!1&&g.defaultSmoothOrigin!==!1?(i=k-t,j=l-u,v.xOffset+=i*w[0]+j*w[2]-i,v.yOffset+=i*w[1]+j*w[3]-j):v.xOffset=v.yOffset=0),f||a.setAttribute("data-svg-origin",h.join(" "))},Ma=function(a){var b,c=P("svg",this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),d=this.parentNode,e=this.nextSibling,f=this.style.cssText;if(Ja.appendChild(c),c.appendChild(this),this.style.display="block",a)try{b=this.getBBox(),this._originalGetBBox=this.getBBox,this.getBBox=Ma}catch(g){}else this._originalGetBBox&&(b=this._originalGetBBox());return e?d.insertBefore(this,e):d.appendChild(this),Ja.removeChild(c),this.style.cssText=f,b},Na=function(a){try{return a.getBBox()}catch(b){return Ma.call(a,!0)}},Oa=function(a){return!(!(Ha&&a.getCTM&&Na(a))||a.parentNode&&!a.ownerSVGElement)},Pa=[1,0,0,1,0,0],Qa=function(a,b){var c,d,e,f,g,h,i=a._gsTransform||new Ga,j=1e5,k=a.style;if(Ca?d=_(a,Da,null,!0):a.currentStyle&&(d=a.currentStyle.filter.match(G),d=d&&4===d.length?[d[0].substr(4),Number(d[2].substr(4)),Number(d[1].substr(4)),d[3].substr(4),i.x||0,i.y||0].join(","):""),c=!d||"none"===d||"matrix(1, 0, 0, 1, 0, 0)"===d,c&&Ca&&((h="none"===$(a).display)||!a.parentNode)&&(h&&(f=k.display,k.display="block"),a.parentNode||(g=1,Ja.appendChild(a)),d=_(a,Da,null,!0),c=!d||"none"===d||"matrix(1, 0, 0, 1, 0, 0)"===d,f?k.display=f:h&&Va(k,"display"),g&&Ja.removeChild(a)),(i.svg||a.getCTM&&Oa(a))&&(c&&-1!==(k[Ca]+"").indexOf("matrix")&&(d=k[Ca],c=0),e=a.getAttribute("transform"),c&&e&&(-1!==e.indexOf("matrix")?(d=e,c=0):-1!==e.indexOf("translate")&&(d="matrix(1,0,0,1,"+e.match(/(?:\-|\b)[\d\-\.e]+\b/gi).join(",")+")",c=0))),c)return Pa;for(e=(d||"").match(s)||[],wa=e.length;--wa>-1;)f=Number(e[wa]),e[wa]=(g=f-(f|=0))?(g*j+(0>g?-.5:.5)|0)/j+f:f;return b&&e.length>6?[e[0],e[1],e[4],e[5],e[12],e[13]]:e},Ra=S.getTransform=function(a,c,d,e){if(a._gsTransform&&d&&!e)return a._gsTransform;var f,h,i,j,k,l,m=d?a._gsTransform||new Ga:new Ga,n=m.scaleX<0,o=2e-5,p=1e5,q=Fa?parseFloat(_(a,Ea,c,!1,"0 0 0").split(" ")[2])||m.zOrigin||0:0,r=parseFloat(g.defaultTransformPerspective)||0;if(m.svg=!(!a.getCTM||!Oa(a)),m.svg&&(La(a,_(a,Ea,c,!1,"50% 50%")+"",m,a.getAttribute("data-svg-origin")),Aa=g.useSVGTransformAttr||Ka),f=Qa(a),f!==Pa){if(16===f.length){var s,t,u,v,w,x=f[0],y=f[1],z=f[2],A=f[3],B=f[4],C=f[5],D=f[6],E=f[7],F=f[8],G=f[9],H=f[10],I=f[12],J=f[13],K=f[14],M=f[11],N=Math.atan2(D,H);m.zOrigin&&(K=-m.zOrigin,I=F*K-f[12],J=G*K-f[13],K=H*K+m.zOrigin-f[14]),m.rotationX=N*L,N&&(v=Math.cos(-N),w=Math.sin(-N),s=B*v+F*w,t=C*v+G*w,u=D*v+H*w,F=B*-w+F*v,G=C*-w+G*v,H=D*-w+H*v,M=E*-w+M*v,B=s,C=t,D=u),N=Math.atan2(-z,H),m.rotationY=N*L,N&&(v=Math.cos(-N),w=Math.sin(-N),s=x*v-F*w,t=y*v-G*w,u=z*v-H*w,G=y*w+G*v,H=z*w+H*v,M=A*w+M*v,x=s,y=t,z=u),N=Math.atan2(y,x),m.rotation=N*L,N&&(v=Math.cos(-N),w=Math.sin(-N),x=x*v+B*w,t=y*v+C*w,C=y*-w+C*v,D=z*-w+D*v,y=t),m.rotationX&&Math.abs(m.rotationX)+Math.abs(m.rotation)>359.9&&(m.rotationX=m.rotation=0,m.rotationY=180-m.rotationY),m.scaleX=(Math.sqrt(x*x+y*y)*p+.5|0)/p,m.scaleY=(Math.sqrt(C*C+G*G)*p+.5|0)/p,m.scaleZ=(Math.sqrt(D*D+H*H)*p+.5|0)/p,m.rotationX||m.rotationY?m.skewX=0:(m.skewX=B||C?Math.atan2(B,C)*L+m.rotation:m.skewX||0,Math.abs(m.skewX)>90&&Math.abs(m.skewX)<270&&(n?(m.scaleX*=-1,m.skewX+=m.rotation<=0?180:-180,m.rotation+=m.rotation<=0?180:-180):(m.scaleY*=-1,m.skewX+=m.skewX<=0?180:-180))),m.perspective=M?1/(0>M?-M:M):0,m.x=I,m.y=J,m.z=K,m.svg&&(m.x-=m.xOrigin-(m.xOrigin*x-m.yOrigin*B),m.y-=m.yOrigin-(m.yOrigin*y-m.xOrigin*C))}else if(!Fa||e||!f.length||m.x!==f[4]||m.y!==f[5]||!m.rotationX&&!m.rotationY){var O=f.length>=6,P=O?f[0]:1,Q=f[1]||0,R=f[2]||0,S=O?f[3]:1;m.x=f[4]||0,m.y=f[5]||0,i=Math.sqrt(P*P+Q*Q),j=Math.sqrt(S*S+R*R),k=P||Q?Math.atan2(Q,P)*L:m.rotation||0,l=R||S?Math.atan2(R,S)*L+k:m.skewX||0,Math.abs(l)>90&&Math.abs(l)<270&&(n?(i*=-1,l+=0>=k?180:-180,k+=0>=k?180:-180):(j*=-1,l+=0>=l?180:-180)),m.scaleX=i,m.scaleY=j,m.rotation=k,m.skewX=l,Fa&&(m.rotationX=m.rotationY=m.z=0,m.perspective=r,m.scaleZ=1),m.svg&&(m.x-=m.xOrigin-(m.xOrigin*P+m.yOrigin*R),m.y-=m.yOrigin-(m.xOrigin*Q+m.yOrigin*S))}m.zOrigin=q;for(h in m)m[h]-o&&(m[h]=0)}return d&&(a._gsTransform=m,m.svg&&(Aa&&a.style[Ca]?b.delayedCall(.001,function(){Va(a.style,Ca)}):!Aa&&a.getAttribute("transform")&&b.delayedCall(.001,function(){a.removeAttribute("transform")}))),m},Sa=function(a){var b,c,d=this.data,e=-d.rotation*K,f=e+d.skewX*K,g=1e5,h=(Math.cos(e)*d.scaleX*g|0)/g,i=(Math.sin(e)*d.scaleX*g|0)/g,j=(Math.sin(f)*-d.scaleY*g|0)/g,k=(Math.cos(f)*d.scaleY*g|0)/g,l=this.t.style,m=this.t.currentStyle;if(m){c=i,i=-j,j=-c,b=m.filter,l.filter="";var n,o,q=this.t.offsetWidth,r=this.t.offsetHeight,s="absolute"!==m.position,t="progid:DXImageTransform.Microsoft.Matrix(M11="+h+", M12="+i+", M21="+j+", M22="+k,u=d.x+q*d.xPercent/100,v=d.y+r*d.yPercent/100;if(null!=d.ox&&(n=(d.oxp?q*d.ox*.01:d.ox)-q/2,o=(d.oyp?r*d.oy*.01:d.oy)-r/2,u+=n-(n*h+o*i),v+=o-(n*j+o*k)),s?(n=q/2,o=r/2,t+=", Dx="+(n-(n*h+o*i)+u)+", Dy="+(o-(n*j+o*k)+v)+")"):t+=", sizingMethod='auto expand')",-1!==b.indexOf("DXImageTransform.Microsoft.Matrix(")?l.filter=b.replace(H,t):l.filter=t+" "+b,(0===a||1===a)&&1===h&&0===i&&0===j&&1===k&&(s&&-1===t.indexOf("Dx=0, Dy=0")||x.test(b)&&100!==parseFloat(RegExp.$1)||-1===b.indexOf(b.indexOf("Alpha"))&&l.removeAttribute("filter")),!s){var y,z,A,B=8>p?1:-1;for(n=d.ieOffsetX||0,o=d.ieOffsetY||0,d.ieOffsetX=Math.round((q-((0>h?-h:h)*q+(0>i?-i:i)*r))/2+u),d.ieOffsetY=Math.round((r-((0>k?-k:k)*r+(0>j?-j:j)*q))/2+v),wa=0;4>wa;wa++)z=fa[wa],y=m[z],c=-1!==y.indexOf("px")?parseFloat(y):aa(this.t,z,parseFloat(y),y.replace(w,""))||0,A=c!==d[z]?2>wa?-d.ieOffsetX:-d.ieOffsetY:2>wa?n-d.ieOffsetX:o-d.ieOffsetY,l[z]=(d[z]=Math.round(c-A*(0===wa||2===wa?1:B)))+"px"}}},Ta=S.set3DTransformRatio=S.setTransformRatio=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,o,p,q,r,s,t,u,v,w,x,y,z=this.data,A=this.t.style,B=z.rotation,C=z.rotationX,D=z.rotationY,E=z.scaleX,F=z.scaleY,G=z.scaleZ,H=z.x,I=z.y,J=z.z,L=z.svg,M=z.perspective,N=z.force3D,O=z.skewY,P=z.skewX;if(O&&(P+=O,B+=O),((1===a||0===a)&&"auto"===N&&(this.tween._totalTime===this.tween._totalDuration||!this.tween._totalTime)||!N)&&!J&&!M&&!D&&!C&&1===G||Aa&&L||!Fa)return void(B||P||L?(B*=K,x=P*K,y=1e5,c=Math.cos(B)*E,f=Math.sin(B)*E,d=Math.sin(B-x)*-F,g=Math.cos(B-x)*F,x&&"simple"===z.skewType&&(b=Math.tan(x-O*K),b=Math.sqrt(1+b*b),d*=b,g*=b,O&&(b=Math.tan(O*K),b=Math.sqrt(1+b*b),c*=b,f*=b)),L&&(H+=z.xOrigin-(z.xOrigin*c+z.yOrigin*d)+z.xOffset,I+=z.yOrigin-(z.xOrigin*f+z.yOrigin*g)+z.yOffset,Aa&&(z.xPercent||z.yPercent)&&(q=this.t.getBBox(),H+=.01*z.xPercent*q.width,I+=.01*z.yPercent*q.height),q=1e-6,q>H&&H>-q&&(H=0),q>I&&I>-q&&(I=0)),u=(c*y|0)/y+","+(f*y|0)/y+","+(d*y|0)/y+","+(g*y|0)/y+","+H+","+I+")",L&&Aa?this.t.setAttribute("transform","matrix("+u):A[Ca]=(z.xPercent||z.yPercent?"translate("+z.xPercent+"%,"+z.yPercent+"%) matrix(":"matrix(")+u):A[Ca]=(z.xPercent||z.yPercent?"translate("+z.xPercent+"%,"+z.yPercent+"%) matrix(":"matrix(")+E+",0,0,"+F+","+H+","+I+")");if(n&&(q=1e-4,q>E&&E>-q&&(E=G=2e-5),q>F&&F>-q&&(F=G=2e-5),!M||z.z||z.rotationX||z.rotationY||(M=0)),B||P)B*=K,r=c=Math.cos(B),s=f=Math.sin(B),P&&(B-=P*K,r=Math.cos(B),s=Math.sin(B),"simple"===z.skewType&&(b=Math.tan((P-O)*K),b=Math.sqrt(1+b*b),r*=b,s*=b,z.skewY&&(b=Math.tan(O*K),b=Math.sqrt(1+b*b),c*=b,f*=b))),d=-s,g=r;else{if(!(D||C||1!==G||M||L))return void(A[Ca]=(z.xPercent||z.yPercent?"translate("+z.xPercent+"%,"+z.yPercent+"%) translate3d(":"translate3d(")+H+"px,"+I+"px,"+J+"px)"+(1!==E||1!==F?" scale("+E+","+F+")":""));c=g=1,d=f=0}k=1,e=h=i=j=l=m=0,o=M?-1/M:0,p=z.zOrigin,q=1e-6,v=",",w="0",B=D*K,B&&(r=Math.cos(B),s=Math.sin(B),i=-s,l=o*-s,e=c*s,h=f*s,k=r,o*=r,c*=r,f*=r),B=C*K,B&&(r=Math.cos(B),s=Math.sin(B),b=d*r+e*s,t=g*r+h*s,j=k*s,m=o*s,e=d*-s+e*r,h=g*-s+h*r,k*=r,o*=r,d=b,g=t),1!==G&&(e*=G,h*=G,k*=G,o*=G),1!==F&&(d*=F,g*=F,j*=F,m*=F),1!==E&&(c*=E,f*=E,i*=E,l*=E),(p||L)&&(p&&(H+=e*-p,I+=h*-p,J+=k*-p+p),L&&(H+=z.xOrigin-(z.xOrigin*c+z.yOrigin*d)+z.xOffset,I+=z.yOrigin-(z.xOrigin*f+z.yOrigin*g)+z.yOffset),q>H&&H>-q&&(H=w),q>I&&I>-q&&(I=w),q>J&&J>-q&&(J=0)),u=z.xPercent||z.yPercent?"translate("+z.xPercent+"%,"+z.yPercent+"%) matrix3d(":"matrix3d(",u+=(q>c&&c>-q?w:c)+v+(q>f&&f>-q?w:f)+v+(q>i&&i>-q?w:i),u+=v+(q>l&&l>-q?w:l)+v+(q>d&&d>-q?w:d)+v+(q>g&&g>-q?w:g),C||D||1!==G?(u+=v+(q>j&&j>-q?w:j)+v+(q>m&&m>-q?w:m)+v+(q>e&&e>-q?w:e),u+=v+(q>h&&h>-q?w:h)+v+(q>k&&k>-q?w:k)+v+(q>o&&o>-q?w:o)+v):u+=",0,0,0,0,1,0,",u+=H+v+I+v+J+v+(M?1+-J/M:1)+")",A[Ca]=u};j=Ga.prototype,j.x=j.y=j.z=j.skewX=j.skewY=j.rotation=j.rotationX=j.rotationY=j.zOrigin=j.xPercent=j.yPercent=j.xOffset=j.yOffset=0,j.scaleX=j.scaleY=j.scaleZ=1,ya("transform,scale,scaleX,scaleY,scaleZ,x,y,z,rotation,rotationX,rotationY,rotationZ,skewX,skewY,shortRotation,shortRotationX,shortRotationY,shortRotationZ,transformOrigin,svgOrigin,transformPerspective,directionalRotation,parseTransform,force3D,skewType,xPercent,yPercent,smoothOrigin",{parser:function(a,b,c,d,f,h,i){if(d._lastParsedTransform===i)return f;d._lastParsedTransform=i;var j,k=i.scale&&"function"==typeof i.scale?i.scale:0;"function"==typeof i[c]&&(j=i[c],i[c]=b),k&&(i.scale=k(r,a));var l,m,n,o,p,s,t,u,v,w=a._gsTransform,x=a.style,y=1e-6,z=Ba.length,A=i,B={},C="transformOrigin",D=Ra(a,e,!0,A.parseTransform),E=A.transform&&("function"==typeof A.transform?A.transform(r,q):A.transform);if(d._transform=D,E&&"string"==typeof E&&Ca)m=Q.style,m[Ca]=E,m.display="block",m.position="absolute",O.body.appendChild(Q),l=Ra(Q,null,!1),D.svg&&(s=D.xOrigin,t=D.yOrigin,l.x-=D.xOffset,l.y-=D.yOffset,(A.transformOrigin||A.svgOrigin)&&(E={},La(a,ha(A.transformOrigin),E,A.svgOrigin,A.smoothOrigin,!0),s=E.xOrigin,t=E.yOrigin,l.x-=E.xOffset-D.xOffset,l.y-=E.yOffset-D.yOffset),(s||t)&&(u=Qa(Q,!0),l.x-=s-(s*u[0]+t*u[2]),l.y-=t-(s*u[1]+t*u[3]))),O.body.removeChild(Q),l.perspective||(l.perspective=D.perspective),null!=A.xPercent&&(l.xPercent=ja(A.xPercent,D.xPercent)),null!=A.yPercent&&(l.yPercent=ja(A.yPercent,D.yPercent));else if("object"==typeof A){if(l={scaleX:ja(null!=A.scaleX?A.scaleX:A.scale,D.scaleX),scaleY:ja(null!=A.scaleY?A.scaleY:A.scale,D.scaleY),scaleZ:ja(A.scaleZ,D.scaleZ),x:ja(A.x,D.x),y:ja(A.y,D.y),z:ja(A.z,D.z),xPercent:ja(A.xPercent,D.xPercent),yPercent:ja(A.yPercent,D.yPercent),perspective:ja(A.transformPerspective,D.perspective)},p=A.directionalRotation,null!=p)if("object"==typeof p)for(m in p)A[m]=p[m];else A.rotation=p;"string"==typeof A.x&&-1!==A.x.indexOf("%")&&(l.x=0,l.xPercent=ja(A.x,D.xPercent)),"string"==typeof A.y&&-1!==A.y.indexOf("%")&&(l.y=0,l.yPercent=ja(A.y,D.yPercent)),l.rotation=ka("rotation"in A?A.rotation:"shortRotation"in A?A.shortRotation+"_short":"rotationZ"in A?A.rotationZ:D.rotation,D.rotation,"rotation",B),Fa&&(l.rotationX=ka("rotationX"in A?A.rotationX:"shortRotationX"in A?A.shortRotationX+"_short":D.rotationX||0,D.rotationX,"rotationX",B),l.rotationY=ka("rotationY"in A?A.rotationY:"shortRotationY"in A?A.shortRotationY+"_short":D.rotationY||0,D.rotationY,"rotationY",B)),l.skewX=ka(A.skewX,D.skewX),l.skewY=ka(A.skewY,D.skewY)}for(Fa&&null!=A.force3D&&(D.force3D=A.force3D,o=!0),D.skewType=A.skewType||D.skewType||g.defaultSkewType,n=D.force3D||D.z||D.rotationX||D.rotationY||l.z||l.rotationX||l.rotationY||l.perspective,n||null==A.scale||(l.scaleZ=1);--z>-1;)v=Ba[z],E=l[v]-D[v],(E>y||-y>E||null!=A[v]||null!=M[v])&&(o=!0,f=new ta(D,v,D[v],E,f),v in B&&(f.e=B[v]),f.xs0=0,f.plugin=h,d._overwriteProps.push(f.n));return E=A.transformOrigin,D.svg&&(E||A.svgOrigin)&&(s=D.xOffset,t=D.yOffset,La(a,ha(E),l,A.svgOrigin,A.smoothOrigin),f=ua(D,"xOrigin",(w?D:l).xOrigin,l.xOrigin,f,C),f=ua(D,"yOrigin",(w?D:l).yOrigin,l.yOrigin,f,C),(s!==D.xOffset||t!==D.yOffset)&&(f=ua(D,"xOffset",w?s:D.xOffset,D.xOffset,f,C),f=ua(D,"yOffset",w?t:D.yOffset,D.yOffset,f,C)),E="0px 0px"),(E||Fa&&n&&D.zOrigin)&&(Ca?(o=!0,v=Ea,E=(E||_(a,v,e,!1,"50% 50%"))+"",f=new ta(x,v,0,0,f,-1,C),f.b=x[v],f.plugin=h,Fa?(m=D.zOrigin,E=E.split(" "),D.zOrigin=(E.length>2&&(0===m||"0px"!==E[2])?parseFloat(E[2]):m)||0,f.xs0=f.e=E[0]+" "+(E[1]||"50%")+" 0px",f=new ta(D,"zOrigin",0,0,f,-1,f.n),f.b=m,f.xs0=f.e=D.zOrigin):f.xs0=f.e=E):ha(E+"",D)),o&&(d._transformType=D.svg&&Aa||!n&&3!==this._transformType?2:3),j&&(i[c]=j),k&&(i.scale=k),f},prefix:!0}),ya("boxShadow",{defaultValue:"0px 0px 0px 0px #999",prefix:!0,color:!0,multi:!0,keyword:"inset"}),ya("borderRadius",{defaultValue:"0px",parser:function(a,b,c,f,g,h){b=this.format(b);var i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],z=a.style;for(q=parseFloat(a.offsetWidth),r=parseFloat(a.offsetHeight),i=b.split(" "),j=0;jp?1:0))||""):(p=parseFloat(n),s=n.substr((p+"").length)),""===s&&(s=d[c]||t),s!==t&&(v=aa(a,"borderLeft",o,t),w=aa(a,"borderTop",o,t),"%"===s?(m=v/q*100+"%",l=w/r*100+"%"):"em"===s?(x=aa(a,"borderLeft",1,"em"),m=v/x+"em",l=w/x+"em"):(m=v+"px",l=w+"px"),u&&(n=parseFloat(m)+p+s,k=parseFloat(l)+p+s)),g=va(z,y[j],m+" "+l,n+" "+k,!1,"0px",g);return g},prefix:!0,formatter:qa("0px 0px 0px 0px",!1,!0)}),ya("borderBottomLeftRadius,borderBottomRightRadius,borderTopLeftRadius,borderTopRightRadius",{defaultValue:"0px",parser:function(a,b,c,d,f,g){return va(a.style,c,this.format(_(a,c,e,!1,"0px 0px")),this.format(b),!1,"0px",f)},prefix:!0,formatter:qa("0px 0px",!1,!0)}),ya("backgroundPosition",{defaultValue:"0 0",parser:function(a,b,c,d,f,g){var h,i,j,k,l,m,n="background-position",o=e||$(a,null),q=this.format((o?p?o.getPropertyValue(n+"-x")+" "+o.getPropertyValue(n+"-y"):o.getPropertyValue(n):a.currentStyle.backgroundPositionX+" "+a.currentStyle.backgroundPositionY)||"0 0"),r=this.format(b);if(-1!==q.indexOf("%")!=(-1!==r.indexOf("%"))&&r.split(",").length<2&&(m=_(a,"backgroundImage").replace(D,""),m&&"none"!==m)){for(h=q.split(" "),i=r.split(" "),R.setAttribute("src",m),j=2;--j>-1;)q=h[j],k=-1!==q.indexOf("%"),k!==(-1!==i[j].indexOf("%"))&&(l=0===j?a.offsetWidth-R.width:a.offsetHeight-R.height,h[j]=k?parseFloat(q)/100*l+"px":parseFloat(q)/l*100+"%");q=h.join(" ")}return this.parseComplex(a.style,q,r,f,g)},formatter:ha}),ya("backgroundSize",{defaultValue:"0 0",formatter:function(a){return a+="",ha(-1===a.indexOf(" ")?a+" "+a:a)}}),ya("perspective",{defaultValue:"0px",prefix:!0}),ya("perspectiveOrigin",{defaultValue:"50% 50%",prefix:!0}),ya("transformStyle",{prefix:!0}),ya("backfaceVisibility",{prefix:!0}),ya("userSelect",{prefix:!0}),ya("margin",{parser:ra("marginTop,marginRight,marginBottom,marginLeft")}),ya("padding",{parser:ra("paddingTop,paddingRight,paddingBottom,paddingLeft")}),ya("clip",{defaultValue:"rect(0px,0px,0px,0px)",parser:function(a,b,c,d,f,g){var h,i,j;return 9>p?(i=a.currentStyle,j=8>p?" ":",",h="rect("+i.clipTop+j+i.clipRight+j+i.clipBottom+j+i.clipLeft+")", b=this.format(b).split(",").join(j)):(h=this.format(_(a,this.p,e,!1,this.dflt)),b=this.format(b)),this.parseComplex(a.style,h,b,f,g)}}),ya("textShadow",{defaultValue:"0px 0px 0px #999",color:!0,multi:!0}),ya("autoRound,strictUnits",{parser:function(a,b,c,d,e){return e}}),ya("border",{defaultValue:"0px solid #000",parser:function(a,b,c,d,f,g){var h=_(a,"borderTopWidth",e,!1,"0px"),i=this.format(b).split(" "),j=i[0].replace(w,"");return"px"!==j&&(h=parseFloat(h)/aa(a,"borderTopWidth",1,j)+j),this.parseComplex(a.style,this.format(h+" "+_(a,"borderTopStyle",e,!1,"solid")+" "+_(a,"borderTopColor",e,!1,"#000")),i.join(" "),f,g)},color:!0,formatter:function(a){var b=a.split(" ");return b[0]+" "+(b[1]||"solid")+" "+(a.match(pa)||["#000"])[0]}}),ya("borderWidth",{parser:ra("borderTopWidth,borderRightWidth,borderBottomWidth,borderLeftWidth")}),ya("float,cssFloat,styleFloat",{parser:function(a,b,c,d,e,f){var g=a.style,h="cssFloat"in g?"cssFloat":"styleFloat";return new ta(g,h,0,0,e,-1,c,!1,0,g[h],b)}});var Ua=function(a){var b,c=this.t,d=c.filter||_(this.data,"filter")||"",e=this.s+this.c*a|0;100===e&&(-1===d.indexOf("atrix(")&&-1===d.indexOf("radient(")&&-1===d.indexOf("oader(")?(c.removeAttribute("filter"),b=!_(this.data,"filter")):(c.filter=d.replace(z,""),b=!0)),b||(this.xn1&&(c.filter=d=d||"alpha(opacity="+e+")"),-1===d.indexOf("pacity")?0===e&&this.xn1||(c.filter=d+" alpha(opacity="+e+")"):c.filter=d.replace(x,"opacity="+e))};ya("opacity,alpha,autoAlpha",{defaultValue:"1",parser:function(a,b,c,d,f,g){var h=parseFloat(_(a,"opacity",e,!1,"1")),i=a.style,j="autoAlpha"===c;return"string"==typeof b&&"="===b.charAt(1)&&(b=("-"===b.charAt(0)?-1:1)*parseFloat(b.substr(2))+h),j&&1===h&&"hidden"===_(a,"visibility",e)&&0!==b&&(h=0),U?f=new ta(i,"opacity",h,b-h,f):(f=new ta(i,"opacity",100*h,100*(b-h),f),f.xn1=j?1:0,i.zoom=1,f.type=2,f.b="alpha(opacity="+f.s+")",f.e="alpha(opacity="+(f.s+f.c)+")",f.data=a,f.plugin=g,f.setRatio=Ua),j&&(f=new ta(i,"visibility",0,0,f,-1,null,!1,0,0!==h?"inherit":"hidden",0===b?"hidden":"inherit"),f.xs0="inherit",d._overwriteProps.push(f.n),d._overwriteProps.push(c)),f}});var Va=function(a,b){b&&(a.removeProperty?(("ms"===b.substr(0,2)||"webkit"===b.substr(0,6))&&(b="-"+b),a.removeProperty(b.replace(B,"-$1").toLowerCase())):a.removeAttribute(b))},Wa=function(a){if(this.t._gsClassPT=this,1===a||0===a){this.t.setAttribute("class",0===a?this.b:this.e);for(var b=this.data,c=this.t.style;b;)b.v?c[b.p]=b.v:Va(c,b.p),b=b._next;1===a&&this.t._gsClassPT===this&&(this.t._gsClassPT=null)}else this.t.getAttribute("class")!==this.e&&this.t.setAttribute("class",this.e)};ya("className",{parser:function(a,b,d,f,g,h,i){var j,k,l,m,n,o=a.getAttribute("class")||"",p=a.style.cssText;if(g=f._classNamePT=new ta(a,d,0,0,g,2),g.setRatio=Wa,g.pr=-11,c=!0,g.b=o,k=ca(a,e),l=a._gsClassPT){for(m={},n=l.data;n;)m[n.p]=1,n=n._next;l.setRatio(1)}return a._gsClassPT=g,g.e="="!==b.charAt(1)?b:o.replace(new RegExp("(?:\\s|^)"+b.substr(2)+"(?![\\w-])"),"")+("+"===b.charAt(0)?" "+b.substr(2):""),a.setAttribute("class",g.e),j=da(a,k,ca(a),i,m),a.setAttribute("class",o),g.data=j.firstMPT,a.style.cssText=p,g=g.xfirst=f.parse(a,j.difs,g,h)}});var Xa=function(a){if((1===a||0===a)&&this.data._totalTime===this.data._totalDuration&&"isFromStart"!==this.data.data){var b,c,d,e,f,g=this.t.style,h=i.transform.parse;if("all"===this.e)g.cssText="",e=!0;else for(b=this.e.split(" ").join("").split(","),d=b.length;--d>-1;)c=b[d],i[c]&&(i[c].parse===h?e=!0:c="transformOrigin"===c?Ea:i[c].p),Va(g,c);e&&(Va(g,Ca),f=this.t._gsTransform,f&&(f.svg&&(this.t.removeAttribute("data-svg-origin"),this.t.removeAttribute("transform")),delete this.t._gsTransform))}};for(ya("clearProps",{parser:function(a,b,d,e,f){return f=new ta(a,d,0,0,f,2),f.setRatio=Xa,f.e=b,f.pr=-10,f.data=e._tween,c=!0,f}}),j="bezier,throwProps,physicsProps,physics2D".split(","),wa=j.length;wa--;)za(j[wa]);j=g.prototype,j._firstPT=j._lastParsedTransform=j._transform=null,j._onInitTween=function(a,b,h,j){if(!a.nodeType)return!1;this._target=q=a,this._tween=h,this._vars=b,r=j,k=b.autoRound,c=!1,d=b.suffixMap||g.suffixMap,e=$(a,""),f=this._overwriteProps;var n,p,s,t,u,v,w,x,z,A=a.style;if(l&&""===A.zIndex&&(n=_(a,"zIndex",e),("auto"===n||""===n)&&this._addLazySet(A,"zIndex",0)),"string"==typeof b&&(t=A.cssText,n=ca(a,e),A.cssText=t+";"+b,n=da(a,n,ca(a)).difs,!U&&y.test(b)&&(n.opacity=parseFloat(RegExp.$1)),b=n,A.cssText=t),b.className?this._firstPT=p=i.className.parse(a,b.className,"className",this,null,null,b):this._firstPT=p=this.parse(a,b,null),this._transformType){for(z=3===this._transformType,Ca?m&&(l=!0,""===A.zIndex&&(w=_(a,"zIndex",e),("auto"===w||""===w)&&this._addLazySet(A,"zIndex",0)),o&&this._addLazySet(A,"WebkitBackfaceVisibility",this._vars.WebkitBackfaceVisibility||(z?"visible":"hidden"))):A.zoom=1,s=p;s&&s._next;)s=s._next;x=new ta(a,"transform",0,0,null,2),this._linkCSSP(x,null,s),x.setRatio=Ca?Ta:Sa,x.data=this._transform||Ra(a,e,!0),x.tween=h,x.pr=-1,f.pop()}if(c){for(;p;){for(v=p._next,s=t;s&&s.pr>p.pr;)s=s._next;(p._prev=s?s._prev:u)?p._prev._next=p:t=p,(p._next=s)?s._prev=p:u=p,p=v}this._firstPT=t}return!0},j.parse=function(a,b,c,f){var g,h,j,l,m,n,o,p,s,t,u=a.style;for(g in b)n=b[g],"function"==typeof n&&(n=n(r,q)),h=i[g],h?c=h.parse(a,n,g,this,c,f,b):(m=_(a,g,e)+"",s="string"==typeof n,"color"===g||"fill"===g||"stroke"===g||-1!==g.indexOf("Color")||s&&A.test(n)?(s||(n=na(n),n=(n.length>3?"rgba(":"rgb(")+n.join(",")+")"),c=va(u,g,m,n,!0,"transparent",c,0,f)):s&&J.test(n)?c=va(u,g,m,n,!0,null,c,0,f):(j=parseFloat(m),o=j||0===j?m.substr((j+"").length):"",(""===m||"auto"===m)&&("width"===g||"height"===g?(j=ga(a,g,e),o="px"):"left"===g||"top"===g?(j=ba(a,g,e),o="px"):(j="opacity"!==g?0:1,o="")),t=s&&"="===n.charAt(1),t?(l=parseInt(n.charAt(0)+"1",10),n=n.substr(2),l*=parseFloat(n),p=n.replace(w,"")):(l=parseFloat(n),p=s?n.replace(w,""):""),""===p&&(p=g in d?d[g]:o),n=l||0===l?(t?l+j:l)+p:b[g],o!==p&&""!==p&&(l||0===l)&&j&&(j=aa(a,g,j,o),"%"===p?(j/=aa(a,g,100,"%")/100,b.strictUnits!==!0&&(m=j+"%")):"em"===p||"rem"===p||"vw"===p||"vh"===p?j/=aa(a,g,1,p):"px"!==p&&(l=aa(a,g,l,p),p="px"),t&&(l||0===l)&&(n=l+j+p)),t&&(l+=j),!j&&0!==j||!l&&0!==l?void 0!==u[g]&&(n||n+""!="NaN"&&null!=n)?(c=new ta(u,g,l||j||0,0,c,-1,g,!1,0,m,n),c.xs0="none"!==n||"display"!==g&&-1===g.indexOf("Style")?n:m):W("invalid "+g+" tween value: "+b[g]):(c=new ta(u,g,j,l-j,c,0,g,k!==!1&&("px"===p||"zIndex"===g),0,m,n),c.xs0=p))),f&&c&&!c.plugin&&(c.plugin=f);return c},j.setRatio=function(a){var b,c,d,e=this._firstPT,f=1e-6;if(1!==a||this._tween._time!==this._tween._duration&&0!==this._tween._time)if(a||this._tween._time!==this._tween._duration&&0!==this._tween._time||this._tween._rawPrevTime===-1e-6)for(;e;){if(b=e.c*a+e.s,e.r?b=Math.round(b):f>b&&b>-f&&(b=0),e.type)if(1===e.type)if(d=e.l,2===d)e.t[e.p]=e.xs0+b+e.xs1+e.xn1+e.xs2;else if(3===d)e.t[e.p]=e.xs0+b+e.xs1+e.xn1+e.xs2+e.xn2+e.xs3;else if(4===d)e.t[e.p]=e.xs0+b+e.xs1+e.xn1+e.xs2+e.xn2+e.xs3+e.xn3+e.xs4;else if(5===d)e.t[e.p]=e.xs0+b+e.xs1+e.xn1+e.xs2+e.xn2+e.xs3+e.xn3+e.xs4+e.xn4+e.xs5;else{for(c=e.xs0+b+e.xs1,d=1;d-1;)Za(a[e],b,c);else for(d=a.childNodes,e=d.length;--e>-1;)f=d[e],g=f.type,f.style&&(b.push(ca(f)),c&&c.push(f)),1!==g&&9!==g&&11!==g||!f.childNodes.length||Za(f,b,c)};return g.cascadeTo=function(a,c,d){var e,f,g,h,i=b.to(a,c,d),j=[i],k=[],l=[],m=[],n=b._internals.reservedProps;for(a=i._targets||i.target,Za(a,k,m),i.render(c,!0,!0),Za(a,l),i.render(0,!0,!0),i._enabled(!0),e=m.length;--e>-1;)if(f=da(m[e],k[e],l[e]),f.firstMPT){f=f.difs;for(g in d)n[g]&&(f[g]=d[g]);h={};for(g in f)h[g]=k[e][g];j.push(b.fromTo(m[e],c,h,f))}return j},a.activate([g]),g},!0)}),_gsScope._gsDefine&&_gsScope._gsQueue.pop()(),function(a){"use strict";var b=function(){return(_gsScope.GreenSockGlobals||_gsScope)[a]};"function"==typeof define&&define.amd?define(["TweenLite"],b):"undefined"!=typeof module&&module.exports&&(require("../TweenLite.js"),module.exports=b())}("CSSPlugin"); /* SPLIT TEXT UTIL */ /*! * VERSION: 0.5.6 * DATE: 2017-01-17 * UPDATES AND DOCS AT: http://greensock.com * * @license Copyright (c) 2008-2017, GreenSock. All rights reserved. * SplitText is a Club GreenSock membership benefit; You must have a valid membership to use * this code without violating the terms of use. Visit http://greensock.com/club/ to sign up or get more details. * This work is subject to the software agreement that was issued with your membership. * * @author: Jack Doyle, jack@greensock.com */ var _gsScope="undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window;!function(a){"use strict";var b=a.GreenSockGlobals||a,c=function(a){var c,d=a.split("."),e=b;for(c=0;cb;b++)if(c=a[b],j(c))for(d=c.length,d=0;d":">")}},y=d.SplitText=b.SplitText=function(a,b){if("string"==typeof a&&(a=y.selector(a)),!a)throw"cannot split a null element.";this.elements=j(a)?k(a):[a],this.chars=[],this.words=[],this.lines=[],this._originals=[],this.vars=b||{},this.split(b)},z=function(a,b,c){var d=a.nodeType;if(1===d||9===d||11===d)for(a=a.firstChild;a;a=a.nextSibling)z(a,b,c);else(3===d||4===d)&&(a.nodeValue=a.nodeValue.split(b).join(c))},A=function(a,b){for(var c=b.length;--c>-1;)a.push(b[c])},B=function(a){var b,c=[],d=a.length;for(b=0;b!==d;c.push(a[b++]));return c},C=function(a,b,c){for(var d;a&&a!==b;){if(d=a._next||a.nextSibling)return d.textContent.charAt(0)===c;a=a.parentNode||a._parent}return!1},D=function(a){var b,c,d=B(a.childNodes),e=d.length;for(b=0;e>b;b++)c=d[b],c._isSplit?D(c):(b&&3===c.previousSibling.nodeType?c.previousSibling.nodeValue+=3===c.nodeType?c.nodeValue:c.firstChild.nodeValue:3!==c.nodeType&&a.insertBefore(c.firstChild,c),a.removeChild(c))},E=function(a,b,c,d,e,h,j){var k,l,m,n,o,p,q,r,s,t,u,v,w=g(a),x=i(a,"paddingLeft",w),y=-999,B=i(a,"borderBottomWidth",w)+i(a,"borderTopWidth",w),E=i(a,"borderLeftWidth",w)+i(a,"borderRightWidth",w),F=i(a,"paddingTop",w)+i(a,"paddingBottom",w),G=i(a,"paddingLeft",w)+i(a,"paddingRight",w),H=.2*i(a,"fontSize"),I=i(a,"textAlign",w,!0),J=[],K=[],L=[],M=b.wordDelimiter||" ",N=b.span?"span":"div",O=b.type||b.split||"chars,words,lines",P=e&&-1!==O.indexOf("lines")?[]:null,Q=-1!==O.indexOf("words"),R=-1!==O.indexOf("chars"),S="absolute"===b.position||b.absolute===!0,T=b.linesClass,U=-1!==(T||"").indexOf("++"),V=[];for(P&&1===a.children.length&&a.children[0]._isSplit&&(a=a.children[0]),U&&(T=T.split("++").join("")),l=a.getElementsByTagName("*"),m=l.length,o=[],k=0;m>k;k++)o[k]=l[k];if(P||S)for(k=0;m>k;k++)n=o[k],p=n.parentNode===a,(p||S||R&&!Q)&&(v=n.offsetTop,P&&p&&Math.abs(v-y)>H&&"BR"!==n.nodeName&&(q=[],P.push(q),y=v),S&&(n._x=n.offsetLeft,n._y=v,n._w=n.offsetWidth,n._h=n.offsetHeight),P&&((n._isSplit&&p||!R&&p||Q&&p||!Q&&n.parentNode.parentNode===a&&!n.parentNode._isSplit)&&(q.push(n),n._x-=x,C(n,a,M)&&(n._wordEnd=!0)),"BR"===n.nodeName&&n.nextSibling&&"BR"===n.nextSibling.nodeName&&P.push([])));for(k=0;m>k;k++)n=o[k],p=n.parentNode===a,"BR"!==n.nodeName?(S&&(s=n.style,Q||p||(n._x+=n.parentNode._x,n._y+=n.parentNode._y),s.left=n._x+"px",s.top=n._y+"px",s.position="absolute",s.display="block",s.width=n._w+1+"px",s.height=n._h+"px"),!Q&&R?n._isSplit?(n._next=n.nextSibling,n.parentNode.appendChild(n)):n.parentNode._isSplit?(n._parent=n.parentNode,!n.previousSibling&&n.firstChild&&(n.firstChild._isFirst=!0),n.nextSibling&&" "===n.nextSibling.textContent&&!n.nextSibling.nextSibling&&V.push(n.nextSibling),n._next=n.nextSibling&&n.nextSibling._isFirst?null:n.nextSibling,n.parentNode.removeChild(n),o.splice(k--,1),m--):p||(v=!n.nextSibling&&C(n.parentNode,a,M),n.parentNode._parent&&n.parentNode._parent.appendChild(n),v&&n.parentNode.appendChild(f.createTextNode(" ")),b.span&&(n.style.display="inline"),J.push(n)):n.parentNode._isSplit&&!n._isSplit&&""!==n.innerHTML?K.push(n):R&&!n._isSplit&&(b.span&&(n.style.display="inline"),J.push(n))):P||S?(n.parentNode&&n.parentNode.removeChild(n),o.splice(k--,1),m--):Q||a.appendChild(n);for(k=V.length;--k>-1;)V[k].parentNode.removeChild(V[k]);if(P){for(S&&(t=f.createElement(N),a.appendChild(t),u=t.offsetWidth+"px",v=t.offsetParent===a?0:a.offsetLeft,a.removeChild(t)),s=a.style.cssText,a.style.cssText="display:none;";a.firstChild;)a.removeChild(a.firstChild);for(r=" "===M&&(!S||!Q&&!R),k=0;kl;l++)"BR"!==q[l].nodeName&&(n=q[l],t.appendChild(n),r&&n._wordEnd&&t.appendChild(f.createTextNode(" ")),S&&(0===l&&(t.style.top=n._y+"px",t.style.left=x+v+"px"),n.style.top="0px",v&&(n.style.left=n._x-v+"px")));0===m?t.innerHTML=" ":Q||R||(D(t),z(t,String.fromCharCode(160)," ")),S&&(t.style.width=u,t.style.height=n._h+"px"),a.appendChild(t)}a.style.cssText=s}S&&(j>a.clientHeight&&(a.style.height=j-F+"px",a.clientHeighta.clientWidth&&(a.style.width=h-G+"px",a.clientWidth":"",G=!0,H=f.createElement("div"),I=a.parentNode;for(I.insertBefore(H,a),H.textContent=a.nodeValue,I.removeChild(a),a=H,g=e(a),v=-1!==g.indexOf("<"),b.reduceWhiteSpace!==!1&&(g=g.replace(m," ").replace(l,"")),v&&(g=g.split("<").join("{{LT}}")),k=g.length,h=(" "===g.charAt(0)?E:"")+c(),i=0;k>i;i++)if(p=g.charAt(i),p===D&&g.charAt(i-1)!==D&&i){for(h+=G?F:"",G=!1;g.charAt(i+1)===D;)h+=E,i++;i===k-1?h+=E:")"!==g.charAt(i+1)&&(h+=E+c(),G=!0)}else"{"===p&&"{{LT}}"===g.substr(i,6)?(h+=B?d()+"{{LT}}":"{{LT}}",i+=5):p.charCodeAt(0)>=n&&p.charCodeAt(0)<=o||g.charCodeAt(i+1)>=65024&&g.charCodeAt(i+1)<=65039?(w=u(g.substr(i,2)),x=u(g.substr(i+2,2)),j=w>=q&&r>=w&&x>=q&&r>=x||x>=s&&t>=x?4:2,h+=B&&" "!==p?d()+g.substr(i,j)+"":g.substr(i,j),i+=j-1):h+=B&&" "!==p?d()+p+"":p;a.outerHTML=h+(G?F:""),v&&z(I,"{{LT}}","<")},G=function(a,b,c,d){var e,f,g=B(a.childNodes),h=g.length,j="absolute"===b.position||b.absolute===!0;if(3!==a.nodeType||h>1){for(b.absolute=!1,e=0;h>e;e++)f=g[e],(3!==f.nodeType||/\S+/.test(f.nodeValue))&&(j&&3!==f.nodeType&&"inline"===i(f,"display",null,!0)&&(f.style.display="inline-block",f.style.position="relative"),f._isSplit=!0,G(f,b,c,d));return b.absolute=j,void(a._isSplit=!0)}F(a,b,c,d)},H=y.prototype;H.split=function(a){this.isSplit&&this.revert(),this.vars=a=a||this.vars,this._originals.length=this.chars.length=this.words.length=this.lines.length=0;for(var b,c,d,e=this.elements.length,f=a.span?"span":"div",g=("absolute"===a.position||a.absolute===!0,x(a.wordsClass,f)),h=x(a.charsClass,f);--e>-1;)d=this.elements[e],this._originals[e]=d.innerHTML,b=d.clientHeight,c=d.clientWidth,G(d,a,g,h),E(d,a,this.chars,this.words,this.lines,c,b);return this.chars.reverse(),this.words.reverse(),this.lines.reverse(),this.isSplit=!0,this},H.revert=function(){if(!this._originals)throw"revert() call wasn't scoped properly.";for(var a=this._originals.length;--a>-1;)this.elements[a].innerHTML=this._originals[a];return this.chars=[],this.words=[],this.lines=[],this.isSplit=!1,this},y.selector=a.$||a.jQuery||function(b){var c=a.$||a.jQuery;return c?(y.selector=c,c(b)):"undefined"==typeof document?b:document.querySelectorAll?document.querySelectorAll(b):document.getElementById("#"===b.charAt(0)?b.substr(1):b)},y.version="0.5.6"}(_gsScope),function(a){"use strict";var b=function(){return(_gsScope.GreenSockGlobals||_gsScope)[a]};"function"==typeof define&&define.amd?define([],b):"undefined"!=typeof module&&module.exports&&(module.exports=b())}("SplitText"); try{ window.GreenSockGlobals = null; window._gsQueue = null; window._gsDefine = null; delete(window.GreenSockGlobals); delete(window._gsQueue); delete(window._gsDefine); } catch(e) {} try{ window.GreenSockGlobals = oldgs; window._gsQueue = oldgs_queue; } catch(e) {} if (window.tplogs==true) try { console.groupEnd(); } catch(e) {} (function(e,t){ e.waitForImages={hasImageProperties:["backgroundImage","listStyleImage","borderImage","borderCornerImage"]};e.expr[":"].uncached=function(t){var n=document.createElement("img");n.src=t.src;return e(t).is('img[src!=""]')&&!n.complete};e.fn.waitForImages=function(t,n,r){if(e.isPlainObject(arguments[0])){n=t.each;r=t.waitForAll;t=t.finished}t=t||e.noop;n=n||e.noop;r=!!r;if(!e.isFunction(t)||!e.isFunction(n)){throw new TypeError("An invalid callback was supplied.")}return this.each(function(){var i=e(this),s=[];if(r){var o=e.waitForImages.hasImageProperties||[],u=/url\((['"]?)(.*?)\1\)/g;i.find("*").each(function(){var t=e(this);if(t.is("img:uncached")){s.push({src:t.attr("src"),element:t[0]})}e.each(o,function(e,n){var r=t.css(n);if(!r){return true}var i;while(i=u.exec(r)){s.push({src:i[2],element:t[0]})}})})}else{i.find("img:uncached").each(function(){s.push({src:this.src,element:this})})}var f=s.length,l=0;if(f==0){t.call(i[0])}e.each(s,function(r,s){var o=new Image;e(o).bind("load error",function(e){l++;n.call(s.element,l,f,e.type=="load");if(l==f){t.call(i[0]);return false}});o.src=s.src})})}; })(jQuery); // source --> https://demolicionescordoba.es/wp-content/plugins/wonderplugin-gallery/engine/wonderplugingallery.js /** Wonderplugin Gallery - WordPress Photo Video Gallery Plugin * Copyright 2013 Magic Hills Pty Ltd All Rights Reserved * Website: http://www.wonderplugin.com * Version 3.9 */ (function(){var scripts=document.getElementsByTagName("script");var jsFolder="";for(var i=0;i=1){startX=e.targetTouches[0].pageX;startY=e.targetTouches[0].pageY}else touchCancel(event)}function touchMove(event){if(defaults.preventWebBrowser)event.preventDefault(); var e=event.originalEvent;if(e.targetTouches.length>=1){curX=e.targetTouches[0].pageX;curY=e.targetTouches[0].pageY}else touchCancel(event)}function touchEnd(event){if(curX>0||curY>0){triggerHandler();touchCancel(event)}else touchCancel(event)}function touchCancel(event){startX=-1;startY=-1;curX=-1;curY=-1}function triggerHandler(){if(Math.abs(curX-startX)>100)if(curX>startX){if(defaults.swipeRight)defaults.swipeRight.call()}else if(defaults.swipeLeft)defaults.swipeLeft.call();if(Math.abs(curY-startY)> 100)if(curY>startY){if(defaults.swipeBottom)defaults.swipeBottom.call()}else if(defaults.swipeTop)defaults.swipeTop.call()}try{$(this).bind("touchstart",touchStart);$(this).bind("touchmove",touchMove);$(this).bind("touchend",touchEnd);$(this).bind("touchcancel",touchCancel)}catch(e){}})}})(jQuery);(function($){$.fn.drag=function(str,arg,opts){var type=typeof str=="string"?str:"",fn=$.isFunction(str)?str:$.isFunction(arg)?arg:null;if(type.indexOf("drag")!==0)type="drag"+type;opts=(str==fn?arg:opts)|| {};return fn?this.bind(type,opts,fn):this.trigger(type)};var $event=$.event;var $special=$event.special;var drag=null;drag=$special.drag={defaults:{which:1,distance:0,not:":input",handle:null,relative:false,drop:true,click:false},datakey:"dragdata",livekey:"livedrag",add:function(obj){var data=$.data(this,drag.datakey),opts=obj.data||{};data.related+=1;if(!data.live&&obj.selector){data.live=true;$event.add(this,"draginit."+drag.livekey,drag.delegate)}$.each(drag.defaults,function(key,def){if(opts[key]!== undefined)data[key]=opts[key]})},remove:function(){$.data(this,drag.datakey).related-=1},setup:function(){if($.data(this,drag.datakey))return;var data=$.extend({related:0},drag.defaults);$.data(this,drag.datakey,data);$event.add(this,"mousedown",drag.init,data);if(this.attachEvent)this.attachEvent("ondragstart",drag.dontstart)},teardown:function(){if($.data(this,drag.datakey).related)return;$.removeData(this,drag.datakey);$event.remove(this,"mousedown",drag.init);$event.remove(this,"draginit",drag.delegate); drag.textselect(true);if(this.detachEvent)this.detachEvent("ondragstart",drag.dontstart)},init:function(event){var dd=event.data,results;if(dd.which>0&&event.which!=dd.which)return;if($(event.target).is(dd.not))return;if(dd.handle&&!$(event.target).closest(dd.handle,event.currentTarget).length)return;dd.propagates=1;dd.interactions=[drag.interaction(this,dd)];dd.target=event.target;dd.pageX=event.pageX;dd.pageY=event.pageY;dd.dragging=null;results=drag.hijack(event,"draginit",dd);if(!dd.propagates)return; results=drag.flatten(results);if(results&&results.length){dd.interactions=[];$.each(results,function(){dd.interactions.push(drag.interaction(this,dd))})}dd.propagates=dd.interactions.length;if(dd.drop!==false&&$special.drop)$special.drop.handler(event,dd);drag.textselect(false);$event.add(document,"mousemove mouseup",drag.handler,dd);return false},interaction:function(elem,dd){return{drag:elem,callback:new drag.callback,droppable:[],offset:$(elem)[dd.relative?"position":"offset"]()||{top:0,left:0}}}, handler:function(event){var dd=event.data;switch(event.type){case !dd.dragging&&"mousemove":if(Math.pow(event.pageX-dd.pageX,2)+Math.pow(event.pageY-dd.pageY,2)");if(!isIPhone){$videoObj.after($videoPlay);$videoPlay.css({position:"absolute",top:"50%",left:"50%",display:"block",cursor:"pointer",width:64,height:64,"margin-left":-32,"margin-top":-32,"background-image":"url('"+ skinFolder+"html5boxplayer_playvideo.png"+"')","background-position":"center center","background-repeat":"no-repeat"}).bind(eClick,function(){$videoObj.get(0).play()})}var $videoFullscreenBg=$("
");var $videoControls=$("
"+"
"+"
"+"
"+"
"+"
"+"
--:--
"+ "
"+"
"+"
"+"
"+"
"+"
"+"
"+"
"+"
"+"
"+"
--:--
"+"
"+"
"+"
"+"
"+"
"+ "
"+"
");$videoObj.after($videoControls);$videoObj.after($videoFullscreenBg);$videoFullscreenBg.css({display:"none",position:"fixed",left:0,top:0,bottom:0,right:0,"z-index":2147483647});$videoControls.css({display:"block",position:"absolute",width:"100%",height:BAR_HEIGHT,left:0,bottom:0});var userActivate=function(){userActive=true};$videoObj.bind(eClick,function(){userActive=true}).hover(function(){userActive=true},function(){userActive=false});setInterval(function(){if(userActive){$videoControls.show(); userActive=false;clearTimeout(hideControlsTimerId);hideControlsTimerId=setTimeout(function(){if(!$videoObj.get(0).paused)$videoControls.fadeOut()},5E3)}},250);$(".html5boxVideoControlsBg",$videoControls).css({display:"block",position:"absolute",width:"100%",height:"100%",left:0,top:0,"background-color":"#000000",opacity:0.7,filter:"alpha(opacity=70)"});$(".html5boxPlayPause",$videoControls).css({display:"block",position:"relative",width:BUTTON_SIZE+"px",height:BUTTON_SIZE+"px",margin:Math.floor((BAR_HEIGHT- BUTTON_SIZE)/2),"float":"left"});var $videoBtnPlay=$(".html5boxPlay",$videoControls);var $videoBtnPause=$(".html5boxPause",$videoControls);$videoBtnPlay.css({display:"block",position:"absolute",top:0,left:0,width:BUTTON_SIZE+"px",height:BUTTON_SIZE+"px",cursor:"pointer","background-image":"url('"+skinFolder+"html5boxplayer_playpause.png"+"')","background-position":"top left"}).hover(function(){$(this).css({"background-position":"bottom left"})},function(){$(this).css({"background-position":"top left"})}).bind(eClick, function(){$videoObj.get(0).play()});$videoBtnPause.css({display:"none",position:"absolute",top:0,left:0,width:BUTTON_SIZE+"px",height:BUTTON_SIZE+"px",cursor:"pointer","background-image":"url('"+skinFolder+"html5boxplayer_playpause.png"+"')","background-position":"top right"}).hover(function(){$(this).css({"background-position":"bottom right"})},function(){$(this).css({"background-position":"top right"})}).bind(eClick,function(){$videoObj.get(0).pause()});var $videoTimeCurrent=$(".html5boxTimeCurrent", $videoControls);var $videoTimeTotal=$(".html5boxTimeTotal",$videoControls);var $videoSeeker=$(".html5boxSeeker",$videoControls);var $videoSeekerPlay=$(".html5boxSeekerPlay",$videoControls);var $videoSeekerBuffer=$(".html5boxSeekerBuffer",$videoControls);var $videoSeekerHandler=$(".html5boxSeekerHandler",$videoControls);$videoTimeCurrent.css({display:"block",position:"relative","float":"left","line-height":BAR_HEIGHT+"px","font-weight":"normal","font-size":"12px",margin:"0 8px","font-family":"Arial, Helvetica, sans-serif", color:"#fff"});$videoTimeTotal.css({display:"block",position:"relative","float":"right","line-height":BAR_HEIGHT+"px","font-weight":"normal","font-size":"12px",margin:"0 8px","font-family":"Arial, Helvetica, sans-serif",color:"#fff"});$videoSeeker.css({display:"block",cursor:"pointer",overflow:"hidden",position:"relative",height:"10px","background-color":"#222",margin:Math.floor((BAR_HEIGHT-10)/2)+"px 4px"}).bind(eStart,function(e){var e0=isTouch?e.originalEvent.touches[0]:e;var pos=e0.pageX-$videoSeeker.offset().left; $videoSeekerPlay.css({width:pos});$videoObj.get(0).currentTime=pos*$videoObj.get(0).duration/$videoSeeker.width();$videoSeeker.bind(eMove,function(e){var e0=isTouch?e.originalEvent.touches[0]:e;var pos=e0.pageX-$videoSeeker.offset().left;$videoSeekerPlay.css({width:pos});$videoObj.get(0).currentTime=pos*$videoObj.get(0).duration/$videoSeeker.width()})}).bind(eCancel,function(){$videoSeeker.unbind(eMove)});$videoSeekerBuffer.css({display:"block",position:"absolute",left:0,top:0,height:"100%","background-color":"#444"}); $videoSeekerPlay.css({display:"block",position:"absolute",left:0,top:0,height:"100%","background-color":"#fcc500"});if(!isIPhone&&($videoObj.get(0).requestFullscreen||$videoObj.get(0).webkitRequestFullScreen||$videoObj.get(0).mozRequestFullScreen||$videoObj.get(0).webkitEnterFullScreen||$videoObj.get(0).msRequestFullscreen)){var switchScreen=function(fullscreen){if(fullscreen){if($videoObj.get(0).requestFullscreen)$videoObj.get(0).requestFullscreen();else if($videoObj.get(0).webkitRequestFullScreen)$videoObj.get(0).webkitRequestFullScreen(); else if($videoObj.get(0).mozRequestFullScreen)$videoObj.get(0).mozRequestFullScreen();else if($videoObj.get(0).webkitEnterFullScreen)$videoObj.get(0).webkitEnterFullScreen();if($videoObj.get(0).msRequestFullscreen)$videoObj.get(0).msRequestFullscreen()}else if(document.cancelFullScreen)document.cancelFullScreen();else if(document.mozCancelFullScreen)document.mozCancelFullScreen();else if(document.webkitCancelFullScreen)document.webkitCancelFullScreen();else if(document.webkitExitFullscreen)document.webkitExitFullscreen(); else if(document.msExitFullscreen)document.msExitFullscreen()};var switchScreenCSS=function(fullscreen){$videoControls.css({position:fullscreen?"fixed":"absolute"});var backgroundPosY=$videoFullscreen.css("background-position")?$videoFullscreen.css("background-position").split(" ")[1]:$videoFullscreen.css("background-position-y");$videoFullscreen.css({"background-position":(fullscreen?"right":"left")+" "+backgroundPosY});$videoFullscreenBg.css({display:fullscreen?"block":"none"});if(fullscreen){$(document).bind("mousemove", userActivate);$videoControls.css({"z-index":2147483647})}else{$(document).unbind("mousemove",userActivate);$videoControls.css({"z-index":""})}};document.addEventListener("fullscreenchange",function(){isFullscreen=document.fullscreen;switchScreenCSS(document.fullscreen)},false);document.addEventListener("mozfullscreenchange",function(){isFullscreen=document.mozFullScreen;switchScreenCSS(document.mozFullScreen)},false);document.addEventListener("webkitfullscreenchange",function(){isFullscreen=document.webkitIsFullScreen; switchScreenCSS(document.webkitIsFullScreen)},false);$videoObj.get(0).addEventListener("webkitbeginfullscreen",function(){isFullscreen=true},false);$videoObj.get(0).addEventListener("webkitendfullscreen",function(){isFullscreen=false},false);$("head").append("");var $videoFullscreen=$(".html5boxFullscreen",$videoControls);$videoFullscreen.css({display:"block",position:"relative","float":"right",width:BUTTON_SIZE+ "px",height:BUTTON_SIZE+"px",margin:Math.floor((BAR_HEIGHT-BUTTON_SIZE)/2),cursor:"pointer","background-image":"url('"+skinFolder+"html5boxplayer_fullscreen.png"+"')","background-position":"left top"}).hover(function(){var backgroundPosX=$(this).css("background-position")?$(this).css("background-position").split(" ")[0]:$(this).css("background-position-x");$(this).css({"background-position":backgroundPosX+" bottom"})},function(){var backgroundPosX=$(this).css("background-position")?$(this).css("background-position").split(" ")[0]: $(this).css("background-position-x");$(this).css({"background-position":backgroundPosX+" top"})}).bind(eClick,function(){isFullscreen=!isFullscreen;switchScreen(isFullscreen)})}if(hd){var $videoHD=$(".html5boxHD",$videoControls);$videoHD.css({display:"block",position:"relative","float":"right",width:BUTTON_SIZE+"px",height:BUTTON_SIZE+"px",margin:Math.floor((BAR_HEIGHT-BUTTON_SIZE)/2),cursor:"pointer","background-image":"url('"+skinFolder+"html5boxplayer_hd.png"+"')","background-position":(isHd?"right": "left")+" center"}).bind(eClick,function(){isHd=!isHd;$(this).css({"background-position":(isHd?"right":"left")+" center"});parentInst.isHd=isHd;var isPaused=$videoObj.get(0).isPaused;$videoObj.get(0).setAttribute("src",(isHd?hd:src)+"#t="+$videoObj.get(0).currentTime);if(!isPaused)$videoObj.get(0).play();else if(!isIPhone)$videoObj.get(0).pause()})}var volume=$videoObj.get(0).volume;$videoObj.get(0).volume=volume/2+0.1;if($videoObj.get(0).volume===volume/2+0.1){$videoObj.get(0).volume=volume;var $videoVolume= $(".html5boxVolume",$videoControls);var $videoVolumeButton=$(".html5boxVolumeButton",$videoControls);var $videoVolumeBar=$(".html5boxVolumeBar",$videoControls);var $videoVolumeBarBg=$(".html5boxVolumeBarBg",$videoControls);var $videoVolumeBarActive=$(".html5boxVolumeBarActive",$videoControls);$videoVolume.css({display:"block",position:"relative","float":"right",width:BUTTON_SIZE+"px",height:BUTTON_SIZE+"px",margin:Math.floor((BAR_HEIGHT-BUTTON_SIZE)/2)}).hover(function(){clearTimeout(hideVolumeBarTimeoutId); var volume=$videoObj.get(0).volume;$videoVolumeBarActive.css({height:Math.round(volume*100)+"%"});$videoVolumeBar.show()},function(){clearTimeout(hideVolumeBarTimeoutId);hideVolumeBarTimeoutId=setTimeout(function(){$videoVolumeBar.hide()},1E3)});$videoVolumeButton.css({display:"block",position:"absolute",top:0,left:0,width:BUTTON_SIZE+"px",height:BUTTON_SIZE+"px",cursor:"pointer","background-image":"url('"+skinFolder+"html5boxplayer_volume.png"+"')","background-position":"top left"}).hover(function(){var backgroundPosX= $(this).css("background-position")?$(this).css("background-position").split(" ")[0]:$(this).css("background-position-x");$(this).css({"background-position":backgroundPosX+" bottom"})},function(){var backgroundPosX=$(this).css("background-position")?$(this).css("background-position").split(" ")[0]:$(this).css("background-position-x");$(this).css({"background-position":backgroundPosX+" top"})}).bind(eClick,function(){var volume=$videoObj.get(0).volume;if(volume>0){volumeSaved=volume;volume=0}else volume= volumeSaved;var backgroundPosY=$(this).css("background-position")?$(this).css("background-position").split(" ")[1]:$(this).css("background-position-y");$videoVolumeButton.css({"background-position":(volume>0?"left":"right")+" "+backgroundPosY});$videoObj.get(0).volume=volume;$videoVolumeBarActive.css({height:Math.round(volume*100)+"%"})});$videoVolumeBar.css({display:"none",position:"absolute",left:4,bottom:"100%",width:24,height:80,"margin-bottom":Math.floor((BAR_HEIGHT-BUTTON_SIZE)/2),"background-color":"#000000", opacity:0.7,filter:"alpha(opacity=70)"});$videoVolumeBarBg.css({display:"block",position:"relative",width:10,height:68,margin:7,cursor:"pointer","background-color":"#222"});$videoVolumeBarActive.css({display:"block",position:"absolute",bottom:0,left:0,width:"100%",height:"100%","background-color":"#fcc500"});$videoVolumeBarBg.bind(eStart,function(e){var e0=isTouch?e.originalEvent.touches[0]:e;var vol=1-(e0.pageY-$videoVolumeBarBg.offset().top)/$videoVolumeBarBg.height();vol=vol>1?1:vol<0?0:vol;$videoVolumeBarActive.css({height:Math.round(vol* 100)+"%"});$videoVolumeButton.css({"background-position":"left "+(vol>0?"top":"bottom")});$videoObj.get(0).volume=vol;$videoVolumeBarBg.bind(eMove,function(e){var e0=isTouch?e.originalEvent.touches[0]:e;var vol=1-(e0.pageY-$videoVolumeBarBg.offset().top)/$videoVolumeBarBg.height();vol=vol>1?1:vol<0?0:vol;$videoVolumeBarActive.css({height:Math.round(vol*100)+"%"});$videoVolumeButton.css({"background-position":"left "+(vol>0?"top":"bottom")});$videoObj.get(0).volume=vol})}).bind(eCancel,function(){$videoVolumeBarBg.unbind(eMove)})}var calcTimeFormat= function(seconds){var h0=Math.floor(seconds/3600);var h=h0<10?"0"+h0:h0;var m0=Math.floor((seconds-h0*60)/60);var m=m0<10?"0"+m0:m0;var s0=Math.floor(seconds-(h0*3600+m0*60));var s=s0<10?"0"+s0:s0;var r=m+":"+s;if(h0>0)r=h+":"+r;return r};var onVideoPlay=function(){$videoPlay.hide();$videoBtnPlay.hide();$videoBtnPause.show()};var onVideoPause=function(){$videoControls.show();clearTimeout(hideControlsTimerId);$videoPlay.show();$videoBtnPlay.show();$videoBtnPause.hide()};var onVideoUpdate=function(){var curTime= $videoObj.get(0).currentTime;if(curTime){$videoTimeCurrent.text(calcTimeFormat(curTime));var duration=$videoObj.get(0).duration;if(duration){$videoTimeTotal.text(calcTimeFormat(duration));if(!sliderDragging){var sliderW=$videoSeeker.width();var pos=Math.round(sliderW*curTime/duration);$videoSeekerPlay.css({width:pos});$videoSeekerHandler.css({left:pos})}}}};var onVideoProgress=function(){if($videoObj.get(0).buffered&&$videoObj.get(0).buffered.length>0&&!isNaN($videoObj.get(0).buffered.end(0))&&!isNaN($videoObj.get(0).duration)){var sliderW= $videoSeeker.width();$videoSeekerBuffer.css({width:Math.round(sliderW*$videoObj.get(0).buffered.end(0)/$videoObj.get(0).duration)})}};try{$videoObj.bind("play",onVideoPlay);$videoObj.bind("pause",onVideoPause);$videoObj.bind("ended",onVideoPause);$videoObj.bind("timeupdate",onVideoUpdate);$videoObj.bind("progress",onVideoProgress)}catch(e){}}})(jQuery);(function($){var ELEM_ID=0,ELEM_THUMBNAIL=1,ELEM_SRC=2,ELEM_SRC_OGG=3,ELEM_SRC_WEBM=4,ELEM_LINK=5,ELEM_LINKTARGET=6,ELEM_TITLE=7,ELEM_INFORMATION= 8,ELEM_TYPE=9,ELEM_WIDTH=10,ELEM_HEIGHT=11,ELEM_POSTER=12,ELEM_HD=13,ELEM_HD_OGG=14,ELEM_HD_WEBM=15,ELEM_DURATION=16;var TYPE_IMAGE=1,TYPE_SWF=2,TYPE_MP3=3,TYPE_PDF=4,TYPE_VIDEO_FLASH=5,TYPE_VIDEO_MP4=6,TYPE_VIDEO_OGG=7,TYPE_VIDEO_WEBM=8,TYPE_VIDEO_YOUTUBE=9,TYPE_VIDEO_VIMEO=10,TYPE_EMBED_VIDEO=11,TYPE_IFRAME=12;var html5GalleryId=0;$.fn.wonderplugingallery=function(options){var Html5Gallery=function(container,options,id){this.container=container;this.options=options;this.id=id;this.options.flashInstalled= false;try{if(new ActiveXObject("ShockwaveFlash.ShockwaveFlash"))this.options.flashInstalled=true}catch(e){if(navigator.mimeTypes["application/x-shockwave-flash"])this.options.flashInstalled=true}this.options.html5VideoSupported=!!document.createElement("video").canPlayType;this.options.isChrome=navigator.userAgent.match(/Chrome/i)!=null;this.options.isFirefox=navigator.userAgent.match(/Firefox/i)!=null;this.options.isOpera=navigator.userAgent.match(/Opera/i)!=null||navigator.userAgent.match(/OPR\//i)!= null;this.options.isSafari=navigator.userAgent.match(/Safari/i)!=null;this.options.isIE11=navigator.userAgent.match(/Trident\/7/)!=null&&navigator.userAgent.match(/rv:11/)!=null;this.options.isIE=navigator.userAgent.match(/MSIE/i)!=null&&!this.options.isOpera;this.options.isIE10=navigator.userAgent.match(/MSIE 10/i)!=null&&!this.options.isOpera;this.options.isIE9=navigator.userAgent.match(/MSIE 9/i)!=null&&!this.options.isOpera;this.options.isIE8=navigator.userAgent.match(/MSIE 8/i)!=null&&!this.options.isOpera; this.options.isIE7=navigator.userAgent.match(/MSIE 7/i)!=null&&!this.options.isOpera;this.options.isIE6=navigator.userAgent.match(/MSIE 6/i)!=null&&!this.options.isOpera;this.options.isIE678=this.options.isIE6||this.options.isIE7||this.options.isIE8;this.options.isIE6789=this.options.isIE6||this.options.isIE7||this.options.isIE8||this.options.isIE9;this.options.isAndroid=navigator.userAgent.match(/Android/i)!=null;this.options.isIPad=navigator.userAgent.match(/iPad/i)!=null;this.options.isIPhone= navigator.userAgent.match(/iPod/i)!=null||navigator.userAgent.match(/iPhone/i)!=null;this.options.isIOS=this.options.isIPad||this.options.isIPhone;this.options.isMobile=this.options.isAndroid||this.options.isIPad||this.options.isIPhone;this.options.isIOSLess5=this.options.isIPad&&this.options.isIPhone&&(navigator.userAgent.match(/OS 4/i)!=null||navigator.userAgent.match(/OS 3/i)!=null);this.options.supportCSSPositionFixed=!this.options.isIE6&&!this.options.isIOSLess5;this.isTouch="ontouchstart"in window;this.eStart=this.isTouch?"touchstart":"mousedown";this.eMove=this.isTouch?"touchmove":"mousemove";this.eCancel=this.isTouch?"touchcancel":"mouseup";this.eClick=this.isTouch?"touchstart":"click";this.slideshowTimeout=null;this.slideTimer=null;this.slideTimerCount=0;this.looptimes=0;this.updateCarouselTimeout=null;this.disableupdatecarousel=false;this.hideTitleTimeout=null;this.hideToolboxTimeout=null;this.isHd=this.options.hddefault;this.isHTML5=false;this.elemArray=[];$(".html5gallery-loading").hide(); this.container.children().hide();this.container.css({"display":"block","position":"relative"});if(this.options.googlefonts&&this.options.googlefonts.length>0){var fontRef=("https:"==document.location.protocol?"https":"http")+"://fonts.googleapis.com/css?family="+this.options.googlefonts;var fontLink=document.createElement("link");fontLink.setAttribute("rel","stylesheet");fontLink.setAttribute("type","text/css");fontLink.setAttribute("href",fontRef);document.getElementsByTagName("head")[0].appendChild(fontLink)}this.initData(this.init)}; Html5Gallery.prototype={getParams:function(){var result={};var params=window.location.search.substring(1).split("&");for(var i=0;i0;i--){var index=Math.floor(Math.random()*i);var t=instance.elemArray[i];instance.elemArray[i]=instance.elemArray[index];instance.elemArray[index]= t}instance.initYoutubeApi();instance.options.showcarousel=instance.elemArray.length>1&&instance.options.showcarousel;instance.options.watermarkcode="";if(instance.options.fv)instance.options.watermarkcode="";else if(instance.options.watermarklink.length>0)instance.options.watermarkcode="";var freeCss;if(instance.options.fv)freeCss= "display:block;position:absolute;top:10px;left:10px;width:180px;height:18px;line-height:18px;text-align:center;border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px;background-color:#fff;color:#333;font-size:12px;font-family:Arial,Helvetica,sans-serif;";else if(instance.options.watermark.length>0)freeCss="display:block;position:absolute;top:0px;left:0px;";else freeCss="display:none;";instance.options.watermarkcode+="
";if(instance.options.fv)instance.options.watermarkcode+=instance.options.fvm;else if(instance.options.watermark.length>0)instance.options.watermarkcode+="";instance.options.watermarkcode+="
";if(instance.options.fv||instance.options.watermarklink.length>0)instance.options.watermarkcode+="
";instance.createStyle();instance.createMarkup();instance.createImageToolbox();if(instance.elemArray.length<=0)return;instance.createEvents(); instance.loadCarousel();instance.savedElem=-1;instance.curElem=-1;instance.nextElem=-1;instance.prevElem=-1;instance.isPaused=!instance.options.autoslide;instance.isFullscreen=false;instance.showingPoster=false;instance.disableTouchSwipe=false;var params=instance.getParams();instance.slideRun(params["html5galleryid"]&¶ms["html5galleryid"]in instance.elemArray?params["html5galleryid"]:0);if(instance.options.responsive){instance.resizeGallery();$(window).resize(function(){instance.resizeGallery()})}}, resizeGallery:function(){switch(this.options.skin){case "vertical":case "showcase":this.resizeStyleVertical();break;case "light":case "horizontal":case "darkness":case "gallery":default:this.resizeStyleDefault()}this.resizeImageToolbox()},initData:function(onSuccess){this.elemArray=[];if(this.options.src&&this.options.src.length>0){var mediaType=this.options.mediatype?this.options.mediatype:this.checkType(this.options.src);this.elemArray.push(new Array(0,"",this.options.src,this.options.webm,this.options.ogg, "","",this.options.title?this.options.title:"",this.options.title?this.options.title:"",mediaType,this.options.width,this.options.height,this.options.poster,this.options.hd,this.options.hdogg,this.options.hdwebm));this.readTags();onSuccess(this)}else if(this.options.xml&&this.options.xml.length>0){if(this.options.xmlnocache){this.options.xml+=this.options.xml.indexOf("?")<0?"?":"&";this.options.xml+=Math.random()}var instance=this;$.ajax({type:"GET",url:this.options.xml,dataType:"xml",success:function(xmldata){$(xmldata).find("slide").each(function(index, value){var title=$(this).find("title").text();var information=$(this).find("description").text()?$(this).find("description").text():$(this).find("information").text();if(!title)title="";if(!information)information="";var mediaType=$(this).find("mediatype").text()?$(this).find("mediatype").text():instance.checkType($(this).find("file").text());instance.elemArray.push(new Array($(this).find("id").length?$(this).find("id").text():index,$(this).find("thumbnail").text(),$(this).find("file").text(),$(this).find("file-ogg").text(), $(this).find("file-webm").text(),$(this).find("link").text(),$(this).find("linktarget").text(),title,information,mediaType,$(this).find("width").length&&!isNaN(parseInt($(this).find("width").text()))?parseInt($(this).find("width").text()):instance.options.width,$(this).find("height").length&&!isNaN(parseInt($(this).find("height").text()))?parseInt($(this).find("height").text()):instance.options.height,$(this).find("poster").text(),$(this).find("hd").text(),$(this).find("hdogg").text(),$(this).find("hdwebm").text(), $(this).find("duration").text()))});instance.readTags();onSuccess(instance)}})}else if(this.options.remote&&this.options.remote.length>0){var instance=this;$.getJSON(this.options.remote,function(data){for(var i=0;i"+"
"+"
"+"
"+"
"+"
"+"
"+"
"+"
"+"
"+"
"+"
"+"
"+"
"+"
"+"
"+"
"+"
"+"
"+"
"+"
"+"
"+"
"+"
"+"
"+"
"+"
"+"
"+"
"+"
"+"
"+"
"+"");this.$gallery.appendTo(this.container);if(!this.options.socialurlforeach)this.createSocialMedia();if(this.options.googleanalyticsaccount&& !window._gaq){window._gaq=window._gaq||[];window._gaq.push(["_setAccount",this.options.googleanalyticsaccount]);window._gaq.push(["_trackPageview"]);$.getScript(("https:"==document.location.protocol?"https://ssl":"http://www")+".google-analytics.com/ga.js")}},createSocialMedia:function(){$(".html5gallery-viral-"+this.id,this.$gallery).empty();var elemUrl=window.location.href;if(this.options.socialurlforeach)elemUrl+=(window.location.href.indexOf("?")<0?"?":"&")+"html5galleryid="+this.elemArray[this.curElem][ELEM_ID]; if(this.options.showsocialmedia&&this.options.showfacebooklike){var facebook="
"; $(".html5gallery-viral-"+this.id,this.$gallery).append(facebook)}if(this.options.showsocialmedia&&this.options.showtwitter){var twitter="";$(".html5gallery-viral-"+this.id,this.$gallery).append(twitter);$.getScript(("https:"==document.location.protocol?"https:":"http:")+"//platform.twitter.com/widgets.js")}if(this.options.showsocialmedia&&this.options.showgoogleplus){var googlePlus="
0)googlePlus+=" data-href='"+this.options.googleplusurl+"'";else googlePlus+=" data-href='"+elemUrl+"'";googlePlus+=">
";$(".html5gallery-viral-"+this.id,this.$gallery).append(googlePlus);$.getScript("https://apis.google.com/js/plusone.js")}},playGallery:function(){var instance=this;$(".html5gallery-play-"+instance.id,instance.$gallery).hide();$(".html5gallery-pause-"+instance.id,instance.$gallery).show();instance.isPaused=false;var slideshowinterval=instance.elemArray[instance.curElem][ELEM_DURATION]? instance.elemArray[instance.curElem][ELEM_DURATION]:instance.options.slideshowinterval;instance.slideshowTimeout=setTimeout(function(){instance.slideRun(-1)},slideshowinterval);$(".html5gallery-timer-"+instance.id,instance.$gallery).css({width:0});instance.slideTimerCount=0;if(instance.options.showtimer)instance.slideTimer=setInterval(function(){instance.showSlideTimer()},50)},pauseGallery:function(){var instance=this;$(".html5gallery-play-"+instance.id,instance.$gallery).show();$(".html5gallery-pause-"+ instance.id,instance.$gallery).hide();instance.isPaused=true;clearTimeout(instance.slideshowTimeout);$(".html5gallery-timer-"+instance.id,instance.$gallery).css({width:0});clearInterval(instance.slideTimer);instance.slideTimerCount=0},createEvents:function(){var instance=this;$(".html5gallery-play-"+this.id,this.$gallery).click(function(){instance.playGallery()});$(".html5gallery-pause-"+this.id,this.$gallery).click(function(){instance.pauseGallery()});$(".html5gallery-lightbox-"+this.id,this.$gallery).click(function(){instance.goFullscreen()}); $(".html5gallery-left-"+this.id,this.$gallery).click(function(){instance.slideRun(-2,true)});$(".html5gallery-right-"+this.id,this.$gallery).click(function(){instance.slideRun(-1,true)});if(instance.options.enabletouchswipe){var preventBrowser=instance.options.isAndroid&&instance.options.enabletouchswipeonandroid?true:false;$(".html5gallery-box-"+this.id,this.$gallery).touchSwipe({preventWebBrowser:preventBrowser,swipeLeft:function(){if(!instance.disableTouchSwipe)instance.slideRun(-1,true)},swipeRight:function(){if(!instance.disableTouchSwipe)instance.slideRun(-2, true)}})}$(".html5gallery-box-"+this.id,this.$gallery).mousemove(function(){if(instance.options.imagetoolboxmode=="mouseover"){var type=instance.elemArray[instance.curElem][ELEM_TYPE];if(instance.options.showimagetoolbox=="always"||instance.options.showimagetoolbox=="image"&&type==TYPE_IMAGE)instance.showimagetoolbox(type,true)}});$(".html5gallery-box-"+this.id,this.$gallery).hover(function(){instance.onSlideshowOver();if(instance.options.imagetoolboxmode=="mouseover"){var type=instance.elemArray[instance.curElem][ELEM_TYPE]; if(instance.options.showimagetoolbox=="always"||instance.options.showimagetoolbox=="image"&&type==TYPE_IMAGE)instance.showimagetoolbox(type)}},function(){if(instance.options.imagetoolboxmode=="mouseover")instance.hideimagetoolbox()});$(".html5gallery-container-"+this.id).mousemove(function(){if(instance.options.titleoverlay&&instance.options.titleautohide){$(".html5gallery-title-"+instance.id,instance.$gallery).show();clearTimeout(instance.hideTitleTimeout);instance.hideTitleTimeout=setTimeout(function(){$(".html5gallery-title-"+ instance.id,instance.$gallery).fadeOut()},3E3)}});$(".html5gallery-container-"+this.id).hover(function(){if(instance.options.titleoverlay&&instance.options.titleautohide){$(".html5gallery-title-"+instance.id,instance.$gallery).fadeIn();clearTimeout(instance.hideTitleTimeout);instance.hideTitleTimeout=setTimeout(function(){$(".html5gallery-title-"+instance.id,instance.$gallery).fadeOut()},3E3)}},function(){if(instance.options.titleoverlay&&instance.options.titleautohide){$(".html5gallery-title-"+instance.id, instance.$gallery).fadeOut();clearTimeout(instance.hideTitleTimeout)}});$(".html5gallery-car-left-"+this.id,this.$gallery).css({"background-position":"-64px 0px",cursor:""});$(".html5gallery-car-left-"+this.id,this.$gallery).data("disabled",true);$(".html5gallery-car-right-"+this.id,this.$gallery).css({"background-position":"0px 0px"});$(".html5gallery-car-left-"+this.id,this.$gallery).click(function(){if(!$(this).data("disabled")){instance.disableupdatecarousel=true;instance.updateCarouselTimeout= setTimeout(function(){instance.enableUpdateCarousel()},instance.options.updatecarouselinterval);instance.carouselPrev()}});$(".html5gallery-car-right-"+this.id,this.$gallery).click(function(){if(!$(this).data("disabled")){instance.disableupdatecarousel=true;instance.updateCarouselTimeout=setTimeout(function(){instance.enableUpdateCarousel()},instance.options.updatecarouselinterval);instance.carouselNext()}});$(".html5gallery-car-slider-"+this.id,this.$gallery).bind("drag",function(event,data){instance.disableupdatecarousel= true;instance.updateCarouselTimeout=setTimeout(function(){instance.enableUpdateCarousel()},instance.options.updatecarouselinterval);instance.carouselSliderDrag(event,data)});$(".html5gallery-car-slider-bar-"+this.id,this.$gallery).click(function(event){instance.disableupdatecarousel=true;instance.updateCarouselTimeout=setTimeout(function(){instance.enableUpdateCarousel()},instance.options.updatecarouselinterval);instance.carouselBarClicked(event)});$(".html5gallery-car-left-"+this.id,this.$gallery).hover(function(){if(!$(this).data("disabled"))$(this).css({"background-position":"-32px 0px"})}, function(){if(!$(this).data("disabled"))$(this).css({"background-position":"0px 0px"})});$(".html5gallery-car-right-"+this.id,this.$gallery).hover(function(){if(!$(this).data("disabled"))$(this).css({"background-position":"-32px 0px"})},function(){if(!$(this).data("disabled"))$(this).css({"background-position":"0px 0px"})})},createStyle:function(){switch(this.options.skin){case "vertical":case "showcase":this.createStyleVertical();break;case "light":case "horizontal":case "darkness":case "gallery":case "mediapage":default:this.createStyleDefault()}}, resizeStyleVertical:function(){if(!this.container.parent()||!this.container.parent().width())return;this.options.containerWidth=this.container.parent().width();this.options.totalWidth=this.options.containerWidth;if(this.options.showcarousel)if(this.options.carouselposition=="bottom")this.options.carouselWidth=this.options.width;else this.options.carouselWidth=this.options.thumbwidth;if(this.options.carouselposition=="bottom")this.options.width=this.options.totalWidth-2*this.options.padding;else{this.options.width= this.options.totalWidth-2*this.options.padding;if(this.options.carouselWidth+this.options.carouselmargin>0)this.options.width-=this.options.carouselWidth+this.options.carouselmargin}if(this.options.responsivefullscreen&&this.container.parent().height()>0){this.options.containerHeight=this.container.parent().height();this.options.totalHeight=this.options.containerHeight;if(this.options.carouselposition=="bottom")this.options.height=this.options.totalHeight-(this.options.headerHeight+2*this.options.padding+ this.options.carouselheight);else this.options.height=this.options.totalHeight-(this.options.headerHeight+2*this.options.padding)}else{this.options.height=Math.round(this.options.width*this.options.originalHeight/this.options.originalWidth);if(this.options.carouselposition=="bottom")this.options.totalHeight=this.options.height+this.options.headerHeight+2*this.options.padding+this.options.carouselmargin+this.options.carouselHeight;else this.options.totalHeight=this.options.height+this.options.headerHeight+ 2*this.options.padding;this.options.containerHeight=this.options.totalHeight}this.container.css({"width":this.options.containerWidth,"height":this.options.containerHeight});this.options.boxWidth=this.options.width;this.options.boxHeight=this.options.height+this.options.headerHeight;if(this.options.showcarousel)if(this.options.carouselposition=="bottom"){this.options.carouselWidth=this.options.width;this.options.carouselHeight=this.options.carouselheight;this.options.carouselLeft=this.options.padding; this.options.carouselTop=this.options.height+this.options.headerHeight+2*this.options.padding;this.options.carAreaLength=this.options.carouselHeight;this.options.carouselSlider=Math.floor(this.options.carAreaLength/(this.options.thumbheight+this.options.thumbgap)).html5gallery-tn-title-"+this.id+" {width: "+titleWidth+"px;}")}else{this.options.carouselWidth=this.options.thumbwidth;this.options.carouselHeight=this.options.height+this.options.headerHeight;this.options.carTop=0;this.options.carBottom=0;this.options.carAreaLength= this.options.carouselHeight-this.options.carTop-this.options.carBottom;this.options.carouselSlider=Math.floor(this.options.carAreaLength/(this.options.thumbheight+this.options.thumbgap))1?1:scale}else if(this.options.resizemode=="fill")scale=Math.max(this.options.width/imageWidth,this.options.height/imageHeight);else scale=Math.min(this.options.width/imageWidth,this.options.height/imageHeight);var w=Math.round(scale*imageWidth);var h=Math.round(scale*imageHeight);var w1=this.isFullscreen?w:this.options.width; var h1=this.isFullscreen?h:this.options.height;var l=Math.round(w1/2-w/2);var t=Math.round(h1/2-h/2);if(this.isFullscreen)this.adjustFullscreen(w1,h1,true);$(".html5gallery-elem-"+this.id).css({"width":w1+"px","height":h1+"px"});$(".html5gallery-elem-img-"+this.id).css({width:w1+"px",height:h1+"px"});$(".html5gallery-elem-image-"+this.id).css({width:w+"px",height:h+"px",top:t+"px",left:l+"px"})}else if(type==TYPE_VIDEO_FLASH||type==TYPE_VIDEO_MP4||type==TYPE_VIDEO_OGG||type==TYPE_VIDEO_WEBM||type== TYPE_VIDEO_YOUTUBE||type==TYPE_VIDEO_VIMEO||type==TYPE_EMBED_VIDEO){var dataW=this.elemArray[this.curElem][ELEM_WIDTH];var dataH=this.elemArray[this.curElem][ELEM_HEIGHT];var w1,h1;if(this.isFullscreen){scale=Math.min(this.fullscreenWidth/dataW,this.fullscreenHeight/dataH);scale=scale>1?1:scale;w1=Math.round(scale*dataW);h1=Math.round(scale*dataH);this.adjustFullscreen(w1,h1,true)}else{w1=this.options.width;h1=this.options.height}$(".html5gallery-elem-"+this.id).css({"width":w1+"px","height":h1+"px"}); $(".html5gallery-elem-video-"+this.id).css({"width":w1+"px","height":h1+"px"});$(".html5gallery-elem-video-container-"+this.id).css({"width":w1+"px","height":h1+"px"});var h2=this.options.isIPhone?h1-48:h1;$(".html5gallery-elem-video-container-"+this.id).find("video").css({"width":w1+"px","height":h2+"px"});$("#html5gallery-elem-video-"+this.id).css({"width":w1+"px","height":h1+"px"});$("#html5gallery-elem-video-"+this.id).attr("width",w1);$("#html5gallery-elem-video-"+this.id).attr("height",h1); $(".html5gallery-elem-video-"+this.id).find("iframe").attr("width",w1);$(".html5gallery-elem-video-"+this.id).find("iframe").attr("height",h1);$("#html5gallery-elem-video-"+this.id).find("iframe").attr("width",w1);$("#html5gallery-elem-video-"+this.id).find("iframe").attr("height",h1)}else if(type==TYPE_SWF);var titleTop=0;var socialTop=0;if(this.options.headerpos=="bottom"){titleTop=this.options.titleoverlay?this.options.height-this.options.titleheight:this.options.height;socialTop=this.options.titleoverlay? this.options.height:this.options.height+this.options.titleheight}$(".html5gallery-title-"+this.id).css({width:this.options.boxWidth+"px"});if(!this.options.titleoverlay)$(".html5gallery-title-"+this.id).css({top:titleTop+"px"});$(".html5gallery-viral-"+this.id).css({top:socialTop+"px"});$(".html5gallery-timer-"+this.id).css({top:String(this.options.elemTop+this.options.height-2)+"px"});if(this.options.showcarousel){$(".html5gallery-car-"+this.id).css({width:this.options.carouselWidth+"px",height:this.options.carouselHeight+ "px",top:this.options.carouselTop+"px",left:this.options.carouselLeft+"px",top:this.options.carouselTop+"px"});$(".html5gallery-car-list-"+this.id).css({top:this.options.carTop+"px",height:String(this.options.carAreaLength)+"px",width:this.options.carouselWidth+"px"});this.options.thumbShowNum=Math.floor(this.options.carAreaLength/(this.options.thumbheight+this.options.thumbgap));this.options.thumbMaskHeight=this.options.thumbShowNum*this.options.thumbheight+(this.options.thumbShowNum-1)*this.options.thumbgap; this.options.thumbTotalHeight=this.elemArray.length*this.options.thumbheight+(this.elemArray.length-1)*this.options.thumbgap;if(this.options.carouselSlider){this.options.carouselSliderMin=0;this.options.carouselSliderMax=this.options.thumbMaskHeight-54;$(".html5gallery-car-slider-bar-"+this.id).css({height:this.options.thumbMaskHeight+"px"});$(".html5gallery-car-slider-bar-middle-"+this.id).css({height:String(this.options.thumbMaskHeight-32)+"px"});if(this.options.isMobile)$(".html5gallery-car-right-"+ this.id).css({top:String(this.options.thumbMaskHeight-35)+"px"});$(".html5gallery-car-slider-bar-"+this.id).css({display:"block"});$(".html5gallery-car-left-"+this.id).css({display:"block"});$(".html5gallery-car-right-"+this.id).css({display:"block"});$(".html5gallery-car-slider-"+this.id).css({display:"block"})}var maskTop=0;if(this.options.carouselNavButton)maskTop=Math.round(this.options.carAreaLength/2-this.options.thumbMaskHeight/2);$(".html5gallery-car-mask-"+this.id).css({top:maskTop+"px", height:this.options.thumbMaskHeight+"px"});this.carouselHighlight(this.curElem)}},createStyleVertical:function(){if(this.options.thumbshowtitle)this.options.thumbimagewidth=this.options.thumbheight-2*this.options.thumbimageborder-4;else this.options.thumbimagewidth=this.options.thumbwidth-2*this.options.thumbimageborder-4;this.options.thumbimageheight=this.options.thumbheight-2*this.options.thumbimageborder-4;if(!this.options.showtitle)this.options.titleheight=0;if(!this.options.showsocialmedia|| !this.options.showfacebooklike&&!this.options.showtwitter&&!this.options.showgoogleplus)this.options.socialheight=0;this.options.headerHeight=this.options.titleoverlay?this.options.socialheight:this.options.titleheight+this.options.socialheight;this.options.boxWidth=this.options.width;this.options.boxHeight=this.options.height+this.options.headerHeight;this.options.boxLeft=this.options.padding;this.options.boxTop=this.options.padding;if(this.options.showcarousel)if(this.options.carouselposition== "bottom"){this.options.carouselWidth=this.options.width;this.options.carouselHeight=this.options.carouselheight;this.options.carouselLeft=this.options.padding;this.options.carouselTop=this.options.height+this.options.headerHeight+2*this.options.padding;this.options.carAreaLength=this.options.carouselHeight;this.options.carouselSlider=Math.floor(this.options.carAreaLength/(this.options.thumbheight+this.options.thumbgap))0)styleCss+=" .html5gallery-elem-"+this.id+" { overflow:hidden; border-radius:"+ this.options.borderradius+"px; -moz-border-radius:"+this.options.borderradius+"px; -webkit-border-radius:"+this.options.borderradius+"px;}";if(this.options.slideshadow){styleCss+=" .html5gallery-title-"+this.id+" { padding:4px;}";styleCss+=" .html5gallery-timer-"+this.id+" { margin:4px;}";styleCss+=" .html5gallery-elem-"+this.id+" { overflow:hidden; padding:4px; -moz-box-shadow: 0px 2px 5px #aaa; -webkit-box-shadow: 0px 2px 5px #aaa; box-shadow: 0px 2px 5px #aaa;}"}if(this.options.showcarousel){styleCss+= " .html5gallery-car-"+this.id+" { position:absolute; display:block; overflow:hidden; width:"+this.options.carouselWidth+"px; height:"+this.options.carouselHeight+"px; left:"+this.options.carouselLeft+"px; top:"+this.options.carouselTop+"px; }";styleCss+=" .html5gallery-car-list-"+this.id+" { position:absolute; display:block; overflow:hidden; top:"+this.options.carTop+"px; height:"+String(this.options.carAreaLength)+"px; left:0px; width:"+this.options.carouselWidth+"px; "+"}";styleCss+=".html5gallery-thumbs-"+ this.id+" {margin-top:0px; height:"+String(this.elemArray.length*(this.options.thumbheight+this.options.thumbgap))+"px;}";this.options.thumbShowNum=Math.floor(this.options.carAreaLength/(this.options.thumbheight+this.options.thumbgap));this.options.thumbMaskHeight=this.options.thumbShowNum*this.options.thumbheight+(this.options.thumbShowNum-1)*this.options.thumbgap;this.options.thumbTotalHeight=this.elemArray.length*this.options.thumbheight+(this.elemArray.length-1)*this.options.thumbgap;this.options.carouselSliderMin= 0;this.options.carouselSliderMax=this.options.thumbMaskHeight-54;styleCss+=" .html5gallery-car-slider-bar-"+this.id+" { position:absolute; display:"+(this.options.carouselSlider?"block":"none")+"; overflow:hidden; top:0px; height:"+this.options.thumbMaskHeight+"px; left:"+String(this.options.thumbwidth+6)+"px; width:14px;}";styleCss+=" .html5gallery-car-slider-bar-top-"+this.id+" { position:absolute; display:block; top:0px; left:0px; width:14px; height:16px; background:url('"+this.options.skinfolder+ "bartop.png')}";styleCss+=" .html5gallery-car-slider-bar-middle-"+this.id+" { position:absolute; display:block; top:16px; left:0px; width:14px; height:"+String(this.options.thumbMaskHeight-32)+"px; background:url('"+this.options.skinfolder+"bar.png')}";styleCss+=" .html5gallery-car-slider-bar-bottom-"+this.id+" { position:absolute; display:block; bottom:0px; left:0px; width:14px; height:16px; background:url('"+this.options.skinfolder+"barbottom.png')}";if(this.options.isMobile)styleCss+=" .html5gallery-car-left-"+ this.id+" { position:absolute; display:"+(this.options.carouselSlider?"block":"none")+"; cursor:pointer; overflow:hidden; width:16px; height:35px; left:"+String(this.options.thumbwidth+5)+"px; top:0px; background:url('"+this.options.skinfolder+"slidertop.png')} "+" .html5gallery-car-right-"+this.id+" { position:absolute; display:"+(this.options.carouselSlider?"block":"none")+"; cursor:pointer; overflow:hidden; width:16px; height:35px; left:"+String(this.options.thumbwidth+5)+"px; top:"+String(this.options.thumbMaskHeight- 35)+"px; background:url('"+this.options.skinfolder+"sliderbottom.png')} ";else styleCss+=" .html5gallery-car-slider-"+this.id+" { position:absolute; display:"+(this.options.carouselSlider?"block":"none")+"; overflow:hidden; cursor:pointer; top:0px; height:54px; left:"+String(this.options.thumbwidth+5)+"px; width:16px; background:url('"+this.options.skinfolder+"slider.png');}";var maskTop=0;if(this.options.carouselNavButton)maskTop=Math.round(this.options.carAreaLength/2-this.options.thumbMaskHeight/ 2);styleCss+=" .html5gallery-car-mask-"+this.id+" { position:absolute; display:block; overflow:hidden; top:"+maskTop+"px; height:"+this.options.thumbMaskHeight+"px; left:0px; width:"+this.options.thumbwidth+"px;} ";var tabHeight=this.options.thumbheight;if(!this.options.isIE)tabHeight=this.options.thumbheight-2;styleCss+=" .html5gallery-tn-"+this.id+" { display:block; margin-bottom:"+this.options.thumbgap+"px; text-align:center; cursor:pointer; width:"+this.options.thumbwidth+"px;height:"+tabHeight+ "px;overflow:hidden;";if(this.options.carouselbgtransparent)styleCss+="background-color:transparent;";else{if(!this.options.isIE)styleCss+="border-top:1px solid "+this.options.carouseltopborder+"; border-bottom:1px solid "+this.options.carouselbottomborder+";";styleCss+="background-color: "+this.options.carouselbgcolorend+"; "+"background: "+this.options.carouselbgcolorend+" -webkit-gradient(linear, left top, left bottom, from("+this.options.carouselbgcolorstart+"), to("+this.options.carouselbgcolorend+ ")) no-repeat; "+"background: "+this.options.carouselbgcolorend+" -moz-linear-gradient(top, "+this.options.carouselbgcolorstart+", "+this.options.carouselbgcolorend+") no-repeat; "+"filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="+this.options.carouselbgcolorstart+", endColorstr="+this.options.carouselbgcolorend+") no-repeat; "+"-ms-filter: 'progid:DXImageTransform.Microsoft.gradient(startColorstr="+this.options.carouselbgcolorstart+", endColorstr="+this.options.carouselbgcolorend+ ")' no-repeat;"}if(this.options.carouselbgimage)styleCss+="background:url('"+this.options.skinfolder+this.options.carouselbgimage+"') center top;";styleCss+="}";styleCss+=" .html5gallery-tn-selected-"+this.id+" { display:block; margin-bottom:"+this.options.thumbgap+"px;text-align:center; cursor:pointer; width:"+this.options.thumbwidth+"px;height:"+tabHeight+"px;overflow:hidden;";if(this.options.carouselbgtransparent)styleCss+="background-color:transparent;";else{if(!this.options.isIE)styleCss+="border-top:1px solid "+ this.options.carouselhighlighttopborder+"; border-bottom:1px solid "+this.options.carouselhighlightbottomborder+";";styleCss+="background-color: "+this.options.carouselhighlightbgcolorend+"; "+"background: "+this.options.carouselhighlightbgcolorend+" -webkit-gradient(linear, left top, left bottom, from("+this.options.carouselhighlightbgcolorstart+"), to("+this.options.carouselhighlightbgcolorend+")) no-repeat; "+"background: "+this.options.carouselhighlightbgcolorend+" -moz-linear-gradient(top, "+ this.options.carouselhighlightbgcolorstart+", "+this.options.carouselhighlightbgcolorend+") no-repeat; "+"filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="+this.options.carouselhighlightbgcolorstart+", endColorstr="+this.options.carouselhighlightbgcolorend+") no-repeat; "+"-ms-filter: 'progid:DXImageTransform.Microsoft.gradient(startColorstr="+this.options.carouselhighlightbgcolorstart+", endColorstr="+this.options.carouselhighlightbgcolorend+")' no-repeat;"}if(this.options.carouselbgimage)styleCss+= "background:url('"+this.options.skinfolder+this.options.carouselbgimage+"') center top;";styleCss+="}";styleCss+=" .html5gallery-tn-selected-"+this.id+" .html5gallery-tn-img-"+this.id+" {background-color:"+this.options.thumbimagebordercolor+";}"+" .html5gallery-tn-"+this.id+" { filter:alpha(opacity="+Math.round(this.options.thumbopacity*100)+"); opacity:"+this.options.thumbopacity+"; } "+" .html5gallery-tn-selected-"+this.id+" { filter:alpha(opacity=100); opacity:1; } ";var titleWidth=this.options.thumbwidth- 3*this.options.thumbmargin;if(this.options.thumbshowimage){titleWidth-=this.options.thumbimagewidth+2*this.options.thumbimageborder;var imgLeft;if(this.options.thumbshowtitle)imgLeft=this.options.thumbmargin;else imgLeft=this.options.thumbwidth/2-(this.options.thumbimagewidth+2*this.options.thumbimageborder)/2;var imgTop=Math.round((this.options.thumbheight-2)/2-(this.options.thumbimageheight+2*this.options.thumbimageborder)/2);styleCss+=" .html5gallery-tn-img-"+this.id+" {display:block; overflow:hidden; float:left; margin-top:"+ imgTop+"px; margin-left:"+imgLeft+"px; width:"+String(this.options.thumbimagewidth+2*this.options.thumbimageborder)+"px;height:"+String(this.options.thumbimageheight+2*this.options.thumbimageborder)+"px;}"}else styleCss+=" .html5gallery-tn-img-"+this.id+" {display:none;}";if(this.options.thumbshowtitle){styleCss+=" .html5gallery-tn-title-"+this.id+" {display:block; overflow:hidden; float:left; margin-top:0px; margin-left:"+this.options.thumbmargin+"px; width:"+titleWidth+"px;height:"+String(this.options.thumbheight- 2)+"px;"+(this.options.thumbshowdescription?"":"line-height:"+String(this.options.thumbheight-2)+"px;")+"}";styleCss+=" .html5gallery-tn-title-"+this.id+this.options.thumbtitlecss;styleCss+=" .html5gallery-tn-description-"+this.id+this.options.thumbdescriptioncss}else{styleCss+=" .html5gallery-tn-title-"+this.id+" {display:none;}";styleCss+=" .html5gallery-tn-description-"+this.id+" {display:none;}"}this.carouselHighlight=function(index){$("#html5gallery-tn-"+this.id+"-"+index,this.$gallery).removeClass("html5gallery-tn-"+ this.id).addClass("html5gallery-tn-selected-"+this.id);if(this.options.thumbShowNum>=this.elemArray.length)return;var pos=Math.floor(index/this.options.thumbShowNum)*this.options.thumbShowNum*(this.options.thumbheight+this.options.thumbgap);if(pos>=this.options.thumbTotalHeight-this.options.thumbMaskHeight)pos=this.options.thumbTotalHeight-this.options.thumbMaskHeight;var m1=pos/(this.elemArray.length*(this.options.thumbheight+this.options.thumbgap)-this.options.thumbMaskHeight);m1=m1*(this.options.carouselSliderMax- this.options.carouselSliderMin);$(".html5gallery-car-slider-"+this.id,this.$gallery).stop(true).animate({top:m1},300);$(".html5gallery-thumbs-"+this.id,this.$gallery).stop(true).animate({marginTop:-1*pos},300);this.updateCarouseButtons(-pos)};this.carouselBarClicked=function(event){var $thumbContainer=$(".html5gallery-thumbs-"+this.id,this.$gallery);var pos;if(event.pageY>$(".html5gallery-car-slider-"+this.id,this.$gallery).offset().top){pos=-1*parseInt($thumbContainer.css("margin-top"))+this.options.thumbShowNum* (this.options.thumbheight+this.options.thumbgap);if(pos>=this.options.thumbTotalHeight-this.options.thumbMaskHeight)pos=this.options.thumbTotalHeight-this.options.thumbMaskHeight}else{pos=-1*parseInt($thumbContainer.css("margin-top"))-this.options.thumbShowNum*(this.options.thumbheight+this.options.thumbgap);if(pos<0)pos=0}$thumbContainer.stop(true).animate({marginTop:-pos},500);this.updateCarouseButtons(-pos);var m1=this.elemArray.length*(this.options.thumbheight+this.options.thumbgap)-this.options.thumbMaskHeight; pos=pos*(this.options.carouselSliderMax-this.options.carouselSliderMin)/m1;if(posthis.options.carouselSliderMax)pos=this.options.carouselSliderMax;$(".html5gallery-car-slider-"+this.id,this.$gallery).stop(true).animate({top:pos},500)};this.carouselSliderDrag=function(event,data){var pos=data.offsetY-$(".html5gallery-car-slider-bar-"+this.id,this.$gallery).offset().top;if(posthis.options.carouselSliderMax)pos=this.options.carouselSliderMax;$(".html5gallery-car-slider-"+this.id,this.$gallery).css({top:pos});var m1=this.elemArray.length*(this.options.thumbheight+this.options.thumbgap)-this.options.thumbMaskHeight;m1=m1*pos/(this.options.carouselSliderMax-this.options.carouselSliderMin);m1=Math.round(m1/(this.options.thumbheight+this.options.thumbgap));m1=-1*m1*(this.options.thumbheight+this.options.thumbgap);$(".html5gallery-thumbs-"+this.id,this.$gallery).stop(true).animate({marginTop:m1}, 300)};this.carouselPrev=function(){var $thumbContainer=$(".html5gallery-thumbs-"+this.id,this.$gallery);if(parseInt($thumbContainer.css("margin-top"))==0)return;else{var pos=-1*parseInt($thumbContainer.css("margin-top"))-this.options.thumbShowNum*(this.options.thumbheight+this.options.thumbgap);if(pos<0)pos=0;$thumbContainer.animate({marginTop:-pos},500,this.options.carouseleasing);this.updateCarouseButtons(-pos)}};this.carouselNext=function(){var $thumbContainer=$(".html5gallery-thumbs-"+this.id, this.$gallery);if(parseInt($thumbContainer.css("margin-top"))==-(this.options.thumbTotalHeight-this.options.thumbMaskHeight))return;else{var pos=-1*parseInt($thumbContainer.css("margin-top"))+this.options.thumbShowNum*(this.options.thumbheight+this.options.thumbgap);if(pos>=this.options.thumbTotalHeight-this.options.thumbMaskHeight)pos=this.options.thumbTotalHeight-this.options.thumbMaskHeight;$thumbContainer.animate({marginTop:-pos},500,this.options.carouseleasing);this.updateCarouseButtons(-pos)}}; this.updateCarouseButtons=function(pos){var $leftButton=$(".html5gallery-car-left-"+this.id,this.$gallery);var $rightButton=$(".html5gallery-car-right-"+this.id,this.$gallery);var rightMost=-1*(this.options.thumbTotalHeight-this.options.thumbMaskHeight);if(pos==0){$leftButton.css({"background-position":"-64px 0px",cursor:""});$leftButton.data("disabled",true)}else if($leftButton.data("disabled")){$leftButton.css({"background-position":"0px 0px",cursor:"pointer"});$leftButton.data("disabled",false)}if(pos== rightMost){$rightButton.css({"background-position":"-64px 0px",cursor:""});$rightButton.data("disabled",true)}else if($rightButton.data("disabled")){$rightButton.css({"background-position":"0px 0px",cursor:"pointer"});$rightButton.data("disabled",false)}}}else styleCss+=" .html5gallery-car-"+this.id+" { display:none; }";styleCss+=".html5gallery-container-"+this.id+" div {box-sizing:content-box;}";$("head").append("")},resizeImageToolbox:function(){if(this.options.imagetoolboxstyle!= "center"){var buttonT=Math.round((this.options.headerpos=="bottom"?0:this.options.headerHeight)+this.options.height/2-24);var buttonB=buttonT+Math.round(this.options.height/2)-32;var buttonR=this.options.width-54;var buttonR1=buttonR;var buttonR2=this.options.showfullscreenbutton?buttonR1-48:buttonR1;$(".html5gallery-play-"+this.id).css({"top":buttonB+"px","left":buttonR2+"px"});$(".html5gallery-pause-"+this.id).css({"top":buttonB+"px","left":buttonR2+"px"});$(".html5gallery-left-"+this.id).css({"top":buttonT+ "px"});$(".html5gallery-right-"+this.id).css({"top":buttonT+"px","left":buttonR1+"px"});$(".html5gallery-lightbox-"+this.id).css({"top":buttonB+"px","left":buttonR1+"px"})}},createImageToolbox:function(){if(this.elemArray.length<=1)this.options.showplaybutton=this.options.showprevbutton=this.options.shownextbutton=false;if(this.options.showimagetoolbox!="never"){var styleCss;if(this.options.imagetoolboxstyle=="center"){var toolboxH=40;styleCss=" .html5gallery-toolbox-"+this.id+" {display:"+(this.options.imagetoolboxmode== "show"?"block":"none")+"; overflow:hidden; position:relative; margin:0px auto; text-align:center; height:"+toolboxH+"px;}";styleCss+=" .html5gallery-toolbox-bg-"+this.id+" {display:block; left:0px; top:0px; width:100%; height:100%; position:absolute; filter:alpha(opacity=60); opacity:0.6; background-color:#222222; }";styleCss+=" .html5gallery-toolbox-buttons-"+this.id+" {display:block; margin:0px auto; height:100%;}";styleCss+=" .html5gallery-play-"+this.id+" { position:relative; float:left; display:"+ (this.options.imagetoolboxmode=="show"?"block":"none")+"; cursor:pointer; overflow:hidden; width:32px; height:32px; margin-left:2px; margin-right:2px; margin-top:"+Math.round(toolboxH/2-16)+"px; background:url('"+this.options.skinfolder+"play.png') no-repeat top left; } ";styleCss+=" .html5gallery-pause-"+this.id+" { position:relative; float:left; display:"+(this.options.imagetoolboxmode=="show"?"block":"none")+"; cursor:pointer; overflow:hidden; width:32px; height:32px; margin-left:2px; margin-right:2px; margin-top:"+ Math.round(toolboxH/2-16)+"px; background:url('"+this.options.skinfolder+"pause.png') no-repeat top left; } ";styleCss+=" .html5gallery-left-"+this.id+" { position:relative; float:left; display:"+(this.options.imagetoolboxmode=="show"?"block":"none")+"; cursor:pointer; overflow:hidden; width:32px; height:32px; margin-left:2px; margin-right:2px; margin-top:"+Math.round(toolboxH/2-16)+"px; background:url('"+this.options.skinfolder+"prev.png') no-repeat top left; } ";styleCss+=" .html5gallery-right-"+ this.id+" { position:relative; float:left; display:"+(this.options.imagetoolboxmode=="show"?"block":"none")+"; cursor:pointer; overflow:hidden; width:32px; height:32px; margin-left:2px; margin-right:2px; margin-top:"+Math.round(toolboxH/2-16)+"px; background:url('"+this.options.skinfolder+"next.png') no-repeat top left; } ";styleCss+=" .html5gallery-lightbox-"+this.id+" {position:relative; float:left; display:"+(this.options.imagetoolboxmode=="show"?"block":"none")+"; cursor:pointer; overflow:hidden; width:32px; height:32px; margin-left:2px; margin-right:2px; margin-top:"+ Math.round(toolboxH/2-16)+"px; background:url('"+this.options.skinfolder+"lightbox.png') no-repeat top left; } "}else{var buttonT=Math.round((this.options.headerpos=="bottom"?0:this.options.headerHeight)+this.options.height/2-24);var buttonB=buttonT+Math.round(this.options.height/2)-32;var buttonR=this.options.width-54;var buttonR1=buttonR;var buttonR2=this.options.showfullscreenbutton?buttonR1-48:buttonR1;styleCss=" .html5gallery-toolbox-"+this.id+" {display:"+(this.options.imagetoolboxmode=="show"? "block":"none")+";}";styleCss+=" .html5gallery-toolbox-bg-"+this.id+" {display:none;}";styleCss+=" .html5gallery-toolbox-buttons-"+this.id+" {display:block;}";styleCss+=" .html5gallery-play-"+this.id+" { position:absolute; display:"+(this.options.imagetoolboxmode=="show"?"block":"none")+"; cursor:pointer; top:"+buttonB+"px; left:"+buttonR2+"px; width:48px; height:48px; background:url('"+this.options.skinfolder+"side_play.png') no-repeat top left;} ";styleCss+=" .html5gallery-pause-"+this.id+" { position:absolute; display:"+ (this.options.imagetoolboxmode=="show"?"block":"none")+"; cursor:pointer; top:"+buttonB+"px; left:"+buttonR2+"px; width:48px; height:48px; background:url('"+this.options.skinfolder+"side_pause.png') no-repeat top left;} ";styleCss+=" .html5gallery-left-"+this.id+" { position:absolute; display:"+(this.options.imagetoolboxmode=="show"?"block":"none")+"; cursor:pointer; top:"+buttonT+"px; left:0px; width:48px; height:48px; background:url('"+this.options.skinfolder+"side_prev.png') no-repeat center center;} "; styleCss+=" .html5gallery-right-"+this.id+" { position:absolute; display:"+(this.options.imagetoolboxmode=="show"?"block":"none")+"; cursor:pointer; top:"+buttonT+"px; left:"+buttonR1+"px; width:48px; height:48px; background:url('"+this.options.skinfolder+"side_next.png') no-repeat center center;} ";styleCss+=" .html5gallery-lightbox-"+this.id+" {position:absolute; display:"+(this.options.imagetoolboxmode=="show"?"block":"none")+"; cursor:pointer; top:"+buttonB+"px; left:"+buttonR1+"px; width:48px; height:48px; background:url('"+ this.options.skinfolder+"side_lightbox.png') no-repeat top left;} "}$(".html5gallery-play-"+this.id,this.$gallery).hover(function(){$(this).css({"background-position":"right top"})},function(){$(this).css({"background-position":"left top"})});$(".html5gallery-pause-"+this.id,this.$gallery).hover(function(){$(this).css({"background-position":"right top"})},function(){$(this).css({"background-position":"left top"})});$(".html5gallery-left-"+this.id,this.$gallery).hover(function(){$(this).css({"background-position":"right top"})}, function(){$(this).css({"background-position":"left top"})});$(".html5gallery-right-"+this.id,this.$gallery).hover(function(){$(this).css({"background-position":"right top"})},function(){$(this).css({"background-position":"left top"})});$(".html5gallery-lightbox-"+this.id,this.$gallery).hover(function(){$(this).css({"background-position":"right top"})},function(){$(this).css({"background-position":"left top"})});$("head").append("")}this.showimagetoolbox= function(type,noeffect){if(!this.options.showplaybutton&&!this.options.showprevbutton&&!this.options.shownextbutton&&!this.options.showfullscreenbutton)return;var instance=this;clearTimeout(instance.hideToolboxTimeout);instance.hideToolboxTimeout=setTimeout(function(){instance.hideimagetoolbox()},3E3);if(this.options.imagetoolboxstyle=="center"){var toolboxT=Math.round((this.options.headerpos=="bottom"?0:this.options.headerHeight)+this.options.height/2);if(type==TYPE_VIDEO_MP4||type==TYPE_VIDEO_OGG|| type==TYPE_VIDEO_WEBM||type==TYPE_VIDEO_YOUTUBE||type==TYPE_VIDEO_VIMEO||type==TYPE_EMBED_VIDEO)toolboxT+=45;$(".html5gallery-toolbox-"+this.id,this.$gallery).css({"top":toolboxT});var toolboxW=0;if(this.options.showplaybutton&&type==TYPE_IMAGE){toolboxW+=36;if(this.isPaused){$(".html5gallery-play-"+this.id,this.$gallery).show();$(".html5gallery-pause-"+this.id,this.$gallery).hide()}else{$(".html5gallery-play-"+this.id,this.$gallery).hide();$(".html5gallery-pause-"+this.id,this.$gallery).show()}}else{$(".html5gallery-play-"+ this.id,this.$gallery).hide();$(".html5gallery-pause-"+this.id,this.$gallery).hide()}if(this.options.showprevbutton){toolboxW+=36;$(".html5gallery-left-"+this.id,this.$gallery).show()}else $(".html5gallery-left-"+this.id,this.$gallery).hide();if(this.options.shownextbutton){toolboxW+=36;$(".html5gallery-right-"+this.id,this.$gallery).show()}else $(".html5gallery-right-"+this.id,this.$gallery).hide();if(this.options.showfullscreenbutton&&type==TYPE_IMAGE){toolboxW+=36;$(".html5gallery-lightbox-"+this.id, this.$gallery).show()}else $(".html5gallery-lightbox-"+this.id,this.$gallery).hide();$(".html5gallery-toolbox-"+this.id,this.$gallery).css({width:toolboxW+16});$(".html5gallery-toolbox-buttons-"+this.id,this.$gallery).css({width:toolboxW})}else{if(this.options.showplaybutton&&type==TYPE_IMAGE)if(this.isPaused){$(".html5gallery-play-"+this.id,this.$gallery).show();$(".html5gallery-pause-"+this.id,this.$gallery).hide()}else{$(".html5gallery-play-"+this.id,this.$gallery).hide();$(".html5gallery-pause-"+ this.id,this.$gallery).show()}else{$(".html5gallery-play-"+this.id,this.$gallery).hide();$(".html5gallery-pause-"+this.id,this.$gallery).hide()}if(this.options.showprevbutton)$(".html5gallery-left-"+this.id,this.$gallery).show();else $(".html5gallery-left-"+this.id,this.$gallery).hide();if(this.options.shownextbutton)$(".html5gallery-right-"+this.id,this.$gallery).show();else $(".html5gallery-right-"+this.id,this.$gallery).hide();if(this.options.showfullscreenbutton&&type==TYPE_IMAGE)$(".html5gallery-lightbox-"+ this.id,this.$gallery).show();else $(".html5gallery-lightbox-"+this.id,this.$gallery).hide()}if(this.options.isIE678||noeffect)$(".html5gallery-toolbox-"+this.id,this.$gallery).show();else $(".html5gallery-toolbox-"+this.id,this.$gallery).fadeIn()};this.hideimagetoolbox=function(){clearTimeout(this.hideToolboxTimeout);if(this.options.isIE678)$(".html5gallery-toolbox-"+this.id,this.$gallery).hide();else $(".html5gallery-toolbox-"+this.id,this.$gallery).fadeOut()}},resizeStyleDefault:function(){if(!this.container.parent()|| !this.container.parent().width())return;this.options.containerWidth=this.container.parent().width();this.options.totalWidth=this.options.containerWidth;this.options.width=this.options.totalWidth-2*this.options.padding;if(this.options.showcarousel){this.options.carouselHeight=this.options.thumbheight+2*this.options.thumbmargin;if(this.options.carouselmultirows){this.options.carouselcolumn=Math.floor(this.options.width/(this.options.thumbwidth+this.options.thumbgap));if(this.options.carouselcolumn< 1)this.options.carouselcolumn=1;this.options.carouselHeight=Math.ceil(this.elemArray.length/this.options.carouselcolumn)*(this.options.thumbheight+this.options.thumbrowgap)}}if(this.options.responsivefullscreen&&this.container.parent().height()>0){this.options.containerHeight=this.container.parent().height();this.options.totalHeight=this.options.containerHeight;this.options.height=this.options.totalHeight-(this.options.headerHeight+2*this.options.padding);if(this.options.carouselHeight+this.options.carouselmargin> 0)this.options.height-=this.options.carouselHeight+this.options.carouselmargin}else{this.options.height=Math.round(this.options.width*this.options.originalHeight/this.options.originalWidth);this.options.totalHeight=this.options.height+this.options.carouselHeight+this.options.carouselmargin+this.options.headerHeight+2*this.options.padding;this.options.containerHeight=this.options.totalHeight}this.container.css({"width":this.options.containerWidth,"height":this.options.containerHeight});this.options.boxWidth= this.options.width;this.options.boxHeight=this.options.height+this.options.headerHeight;if(this.options.showcarousel){this.options.carouselWidth=this.options.width;this.options.carouselLeft=this.options.padding;this.options.carouselTop=this.options.padding+this.options.boxHeight+this.options.carouselmargin}$(".html5gallery-container-"+this.id).css({width:this.options.totalWidth+"px",height:this.options.totalHeight+"px"});$(".html5gallery-box-"+this.id).css({width:this.options.boxWidth+"px",height:this.options.boxHeight+ "px"});var type=this.elemArray[this.curElem][ELEM_TYPE];if(type==TYPE_IMAGE||this.showingPoster){var imageWidth=this.elemArray[this.curElem][ELEM_WIDTH];var imageHeight=this.elemArray[this.curElem][ELEM_HEIGHT];var scale;if(this.isFullscreen){scale=Math.min(this.fullscreenWidth/imageWidth,this.fullscreenHeight/imageHeight);scale=scale>1?1:scale}else if(this.options.resizemode=="fill")scale=Math.max(this.options.width/imageWidth,this.options.height/imageHeight);else scale=Math.min(this.options.width/ imageWidth,this.options.height/imageHeight);var w=Math.round(scale*imageWidth);var h=Math.round(scale*imageHeight);var w1=this.isFullscreen?w:this.options.width;var h1=this.isFullscreen?h:this.options.height;var l=Math.round(w1/2-w/2);var t=Math.round(h1/2-h/2);if(this.isFullscreen)this.adjustFullscreen(w1,h1,true);$(".html5gallery-elem-"+this.id).css({"width":w1+"px","height":h1+"px"});$(".html5gallery-elem-img-"+this.id).css({width:w1+"px",height:h1+"px"});$(".html5gallery-elem-image-"+this.id).css({width:w+ "px",height:h+"px",top:t+"px",left:l+"px"})}else if(type==TYPE_VIDEO_FLASH||type==TYPE_VIDEO_MP4||type==TYPE_VIDEO_OGG||type==TYPE_VIDEO_WEBM||type==TYPE_VIDEO_YOUTUBE||type==TYPE_VIDEO_VIMEO||type==TYPE_EMBED_VIDEO){var dataW=this.elemArray[this.curElem][ELEM_WIDTH];var dataH=this.elemArray[this.curElem][ELEM_HEIGHT];var w1,h1;if(this.isFullscreen){scale=Math.min(this.fullscreenWidth/dataW,this.fullscreenHeight/dataH);scale=scale>1?1:scale;w1=Math.round(scale*dataW);h1=Math.round(scale*dataH);this.adjustFullscreen(w1, h1,true)}else{w1=this.options.width;h1=this.options.height}$(".html5gallery-elem-"+this.id).css({"width":w1+"px","height":h1+"px"});$(".html5gallery-elem-video-"+this.id).css({"width":w1+"px","height":h1+"px"});$(".html5gallery-elem-video-container-"+this.id).css({"width":w1+"px","height":h1+"px"});var h2=this.options.isIPhone?h1-48:h1;$(".html5gallery-elem-video-container-"+this.id).find("video").css({"width":w1+"px","height":h2+"px"});$("#html5gallery-elem-video-"+this.id).css({"width":w1+"px", "height":h1+"px"});$("#html5gallery-elem-video-"+this.id).attr("width",w1);$("#html5gallery-elem-video-"+this.id).attr("height",h1);$(".html5gallery-elem-video-"+this.id).find("iframe").attr("width",w1);$(".html5gallery-elem-video-"+this.id).find("iframe").attr("height",h1);$("#html5gallery-elem-video-"+this.id).find("iframe").attr("width",w1);$("#html5gallery-elem-video-"+this.id).find("iframe").attr("height",h1)}else if(type==TYPE_SWF);var titleTop=0;var socialTop=0;if(this.options.headerpos=="bottom"){titleTop= this.options.titleoverlay?this.options.height-this.options.titleheight:this.options.height;socialTop=this.options.titleoverlay?this.options.height:this.options.height+this.options.titleheight}$(".html5gallery-title-"+this.id).css({width:this.options.boxWidth+"px"});if(!this.options.titleoverlay)$(".html5gallery-title-"+this.id).css({top:titleTop+"px"});$(".html5gallery-viral-"+this.id).css({top:socialTop+"px"});$(".html5gallery-timer-"+this.id).css({top:String(this.options.elemTop+this.options.height- 2)+"px"});if(this.options.showcarousel){$(".html5gallery-car-"+this.id).css({width:this.options.width+"px",top:this.options.carouselTop+"px"});var carLeft=4;var carRight=4;if(this.options.slideshadow)carLeft+=12;$(".html5gallery-car-list-"+this.id).css({width:String(this.options.width-carLeft-carRight)+"px"});this.options.carouselNavButton=false;if(Math.floor((this.options.width-carLeft-carRight)/(this.options.thumbwidth+this.options.thumbgap)) this.options.thumbTotalWidth)marginL=this.options.thumbMaskWidth/2-this.options.thumbTotalWidth/2-this.options.thumbgap/2;$(".html5gallery-thumbs-"+this.id).css({"margin-left":marginL+"px",width:String(this.elemArray.length*(this.options.thumbwidth+this.options.thumbgap))+"px"})}var maskLeft=Math.round((this.options.width-carLeft-carRight)/2-this.options.thumbMaskWidth/2);$(".html5gallery-car-mask-"+this.id).css({left:maskLeft+"px",width:this.options.thumbMaskWidth+"px"});this.carouselHighlight(this.curElem, true)}},createStyleDefault:function(){this.options.thumbimagewidth=this.options.thumbwidth-2*this.options.thumbimageborder;this.options.thumbimageheight=this.options.thumbheight-2*this.options.thumbimageborder;if(this.options.thumbshowtitle)this.options.thumbheight+=this.options.thumbtitleheight;if(!this.options.showtitle)this.options.titleheight=0;if(!this.options.showsocialmedia||!this.options.showfacebooklike&&!this.options.showtwitter&&!this.options.showgoogleplus)this.options.socialheight=0; this.options.headerHeight=this.options.titleoverlay?this.options.socialheight:this.options.titleheight+this.options.socialheight;this.options.boxWidth=this.options.width;this.options.boxHeight=this.options.height+this.options.headerHeight;this.options.boxLeft=this.options.padding;this.options.boxTop=this.options.padding;if(this.options.slideshadow){this.options.boxLeft-=4;this.options.boxTop-=4}if(this.options.showcarousel){this.options.carouselWidth=this.options.width;this.options.carouselHeight= this.options.thumbheight+2*this.options.thumbmargin;this.options.carouselLeft=this.options.padding;this.options.carouselTop=this.options.padding+this.options.boxHeight+this.options.carouselmargin;if(this.options.carouselmultirows)this.options.carouselHeight=Math.ceil(this.options.width/(this.options.thumbwidth+this.options.thumbgap))*(this.options.thumbheight+this.options.thumbrowgap)}else{this.options.carouselWidth=0;this.options.carouselHeight=0;this.options.carouselLeft=0;this.options.carouselTop= 0;this.options.carouselmargin=0}this.options.totalWidth=this.options.width+2*this.options.padding;this.options.totalHeight=this.options.height+this.options.carouselHeight+this.options.carouselmargin+this.options.headerHeight+2*this.options.padding;this.options.containerWidth=this.options.totalWidth;this.options.containerHeight=this.options.totalHeight;if(this.options.responsive){this.options.originalWidth=this.options.width;this.options.originalHeight=this.options.height;this.container.css({"max-width":"100%"})}else this.container.css({"width":this.options.containerWidth, "height":this.options.containerHeight});var titleTop=0;var socialTop=0;this.options.elemTop=0;if(this.options.headerpos=="top"){socialTop=0;titleTop=this.options.socialheight;this.options.elemTop=this.options.headerHeight}else if(this.options.headerpos=="bottom"){this.options.elemTop=0;titleTop=this.options.titleoverlay?this.options.height-this.options.titleheight:this.options.height;socialTop=this.options.titleoverlay?this.options.height:this.options.height+this.options.titleheight}var styleCss= " .html5gallery-container-"+this.id+" { display:block; position:absolute; left:0px; top:0px; width:"+this.options.totalWidth+"px; height:"+this.options.totalHeight+"px; "+(!this.options.bgimage?"":"background:url('"+this.options.skinfolder+this.options.bgimage+"') center top;")+" background-color:"+this.options.bgcolor+";}";if(this.options.galleryshadow)styleCss+=" .html5gallery-container-"+this.id+" { -moz-box-shadow: 0px 2px 5px #aaa; -webkit-box-shadow: 0px 2px 5px #aaa; box-shadow: 0px 2px 5px #aaa;}"; styleCss+=" .html5gallery-box-"+this.id+" {display:block; position:absolute; text-align:center; left:"+this.options.boxLeft+"px; top:"+this.options.boxTop+"px; width:"+this.options.boxWidth+"px; height:"+this.options.boxHeight+"px;}";var viralPaddingTop=Math.round(this.options.socialheight/2-12);styleCss+=" .html5gallery-title-text-"+this.id+" "+this.options.titlecss+" .html5gallery-title-text-"+this.id+" "+this.options.titlecsslink+" .html5gallery-error-"+this.id+" "+this.options.errorcss;styleCss+= " .html5gallery-description-text-"+this.id+" "+this.options.descriptioncss+" .html5gallery-description-text-"+this.id+" "+this.options.descriptioncsslink;styleCss+=" .html5gallery-fullscreen-title-"+this.id+""+this.options.lightboxtitlecss+" .html5gallery-fullscreen-title-"+this.id+""+this.options.lightboxtitlelinkcss;styleCss+=" .html5gallery-fullscreen-description-"+this.id+""+this.options.lightboxdescriptioncss+" .html5gallery-fullscreen-description-"+this.id+""+this.options.lightboxdescriptionlinkcss; styleCss+=" .html5gallery-viral-"+this.id+" {display:block; overflow:hidden; position:absolute; text-align:left; top:"+socialTop+"px; left:0px; width:"+this.options.boxWidth+"px; height:"+this.options.socialheight+"px; padding-top:"+viralPaddingTop+"px;}";styleCss+=" .html5gallery-title-"+this.id+" {display:"+(this.options.titleoverlay&&this.options.titleautohide?"none":"block")+"; overflow:hidden; position:absolute; left:0px; width:"+this.options.boxWidth+"px; ";if(!this.options.titleoverlay)styleCss+= "top:"+titleTop+"px; height:"+this.options.titleheight+"px; }";else if(this.options.headerpos=="top")styleCss+="top:0px; height:auto; }";else styleCss+="bottom:0px; height:auto; }";styleCss+=" .html5gallery-timer-"+this.id+" {display:block; position:absolute; top:"+String(this.options.elemTop+this.options.height-2)+"px; left:0px; width:0px; height:2px; background-color:#ccc; filter:alpha(opacity=60); opacity:0.6; }";styleCss+=" .html5gallery-elem-"+this.id+" {display:block; overflow:hidden; position:absolute; top:"+ this.options.elemTop+"px; left:0px; width:"+this.options.width+"px; height:"+this.options.height+"px;}";if(this.options.isIE7||this.options.isIE6){styleCss+=" .html5gallery-loading-"+this.id+" {display:none; }";styleCss+=" .html5gallery-loading-center-"+this.id+" {display:none; }"}else{styleCss+=" .html5gallery-loading-"+this.id+" {display:block; position:absolute; top:4px; right:4px; width:100%; height:100%; background:url('"+this.options.skinfolder+"loading.gif') no-repeat top right;}";styleCss+= " .html5gallery-loading-center-"+this.id+" {display:block; position:absolute; top:0px; left:0px; width:100%; height:100%; background:url('"+this.options.skinfolder+"loading_center.gif') no-repeat center center;}"}if(this.options.borderradius>0)styleCss+=" .html5gallery-elem-"+this.id+" {overflow:hidden; border-radius:"+this.options.borderradius+"px; -moz-border-radius:"+this.options.borderradius+"px; -webkit-border-radius:"+this.options.borderradius+"px;}";if(this.options.slideshadow){styleCss+=" .html5gallery-title-"+ this.id+" { padding:4px;}";styleCss+=" .html5gallery-timer-"+this.id+" { margin:4px;}";styleCss+=" .html5gallery-elem-"+this.id+" { overflow:hidden; padding:4px; -moz-box-shadow: 0px 2px 5px #aaa; -webkit-box-shadow: 0px 2px 5px #aaa; box-shadow: 0px 2px 5px #aaa;}"}if(this.options.showcarousel&&this.options.carouselmultirows){styleCss+=" .html5gallery-car-"+this.id+" { position:absolute; display:block; overflow:hidden; left:"+this.options.carouselLeft+"px; top:"+this.options.carouselTop+"px; width:"+ this.options.width+"px;";if(this.options.carouselbgtransparent)styleCss+="background-color:transparent;";else styleCss+="border-top:1px solid "+this.options.carouseltopborder+";"+"border-bottom:1px solid "+this.options.carouselbottomborder+";"+"background-color: "+this.options.carouselbgcolorend+"; "+"background: "+this.options.carouselbgcolorend+" -webkit-gradient(linear, left top, left bottom, from("+this.options.carouselbgcolorstart+"), to("+this.options.carouselbgcolorend+")) no-repeat; "+"background: "+ this.options.carouselbgcolorend+" -moz-linear-gradient(top, "+this.options.carouselbgcolorstart+", "+this.options.carouselbgcolorend+") no-repeat; "+"filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="+this.options.carouselbgcolorstart+", endColorstr="+this.options.carouselbgcolorend+") no-repeat; "+"-ms-filter: 'progid:DXImageTransform.Microsoft.gradient(startColorstr="+this.options.carouselbgcolorstart+", endColorstr="+this.options.carouselbgcolorend+")' no-repeat;";if(this.options.carouselbgimage)styleCss+= "background:url('"+this.options.skinfolder+this.options.carouselbgimage+"') center top;";styleCss+="}";var column=Math.floor(this.options.width/(this.options.thumbwidth+this.options.thumbgap));if(column<1)column=1;var marginL=(this.options.width-column*this.options.thumbwidth-(column-1)*this.options.thumbgap)/2;styleCss+=".html5gallery-thumbs-"+this.id+" { position:relative; display:block; margin-left:"+marginL+"px; width:"+this.options.width+"px; top:0px; }";styleCss+=" .html5gallery-tn-"+this.id+ " { display:block; float:left; margin-left:0px; margin-right:"+this.options.thumbgap+"px; margin-bottom:"+this.options.thumbrowgap+"px; text-align:center; cursor:pointer; width:"+this.options.thumbwidth+"px;height:"+this.options.thumbheight+"px;overflow:hidden;}";if(this.options.thumbshadow)styleCss+=" .html5gallery-tn-"+this.id+" { -moz-box-shadow: 0px 2px 5px #aaa; -webkit-box-shadow: 0px 2px 5px #aaa; box-shadow: 0px 2px 5px #aaa;}";styleCss+=" .html5gallery-tn-selected-"+this.id+" { display:block; float:left; margin-left:0px; margin-right:"+ this.options.thumbgap+"px; margin-bottom:"+this.options.thumbrowgap+"px; text-align:center; cursor:pointer; width:"+this.options.thumbwidth+"px;height:"+this.options.thumbheight+"px;overflow:hidden;}";if(this.options.thumbshadow)styleCss+=" .html5gallery-tn-selected-"+this.id+" { -moz-box-shadow: 0px 2px 5px #aaa; -webkit-box-shadow: 0px 2px 5px #aaa; box-shadow: 0px 2px 5px #aaa;}";styleCss+=" .html5gallery-tn-"+this.id+" {background-color:"+this.options.thumbimagebordercolor+";}"+" .html5gallery-tn-"+ this.id+" { filter:alpha(opacity="+Math.round(this.options.thumbopacity*100)+"); opacity:"+this.options.thumbopacity+"; } "+" .html5gallery-tn-selected-"+this.id+" { filter:alpha(opacity=100); opacity:1; } ";styleCss+=" .html5gallery-tn-img-"+this.id+" {display:block; overflow:hidden; width:"+String(this.options.thumbimagewidth+2*this.options.thumbimageborder)+"px;height:"+String(this.options.thumbimageheight+2*this.options.thumbimageborder)+"px;}";if(this.options.thumbunselectedimagebordercolor)styleCss+= " .html5gallery-tn-selected-"+this.id+" {background-color:"+this.options.thumbunselectedimagebordercolor+";}";if(this.options.thumbshowtitle){styleCss+=" .html5gallery-tn-title-"+this.id+" {display:block; overflow:hidden; float:top; height:"+this.options.thumbtitleheight+"px;width:"+String(this.options.thumbwidth-2)+"px;line-height:"+this.options.thumbtitleheight+"px;}";styleCss+=" .html5gallery-tn-title-"+this.id+this.options.thumbtitlecss}else styleCss+=" .html5gallery-tn-title-"+this.id+" {display:none;}"; this.carouselHighlight=function(index,nonanimation){}}else if(this.options.showcarousel){styleCss+=" .html5gallery-car-"+this.id+" { position:absolute; display:block; overflow:hidden; left:"+this.options.carouselLeft+"px; top:"+this.options.carouselTop+"px; width:"+this.options.width+"px; height:"+this.options.carouselHeight+"px;";if(this.options.carouselbgtransparent)styleCss+="background-color:transparent;";else styleCss+="border-top:1px solid "+this.options.carouseltopborder+";"+"border-bottom:1px solid "+ this.options.carouselbottomborder+";"+"background-color: "+this.options.carouselbgcolorend+"; "+"background: "+this.options.carouselbgcolorend+" -webkit-gradient(linear, left top, left bottom, from("+this.options.carouselbgcolorstart+"), to("+this.options.carouselbgcolorend+")) no-repeat; "+"background: "+this.options.carouselbgcolorend+" -moz-linear-gradient(top, "+this.options.carouselbgcolorstart+", "+this.options.carouselbgcolorend+") no-repeat; "+"filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="+ this.options.carouselbgcolorstart+", endColorstr="+this.options.carouselbgcolorend+") no-repeat; "+"-ms-filter: 'progid:DXImageTransform.Microsoft.gradient(startColorstr="+this.options.carouselbgcolorstart+", endColorstr="+this.options.carouselbgcolorend+")' no-repeat;";if(this.options.carouselbgimage)styleCss+="background:url('"+this.options.skinfolder+this.options.carouselbgimage+"') center top;";styleCss+="}";var carLeft=4;var carRight=4;if(this.options.slideshadow)carLeft+=12;styleCss+=" .html5gallery-car-list-"+ this.id+" { position:absolute; display:block; overflow:hidden; left:"+carLeft+"px; width:"+String(this.options.width-carLeft-carRight)+"px; top:0px; height:"+this.options.carouselHeight+"px; "+"}";this.options.carouselNavButton=false;if(Math.floor((this.options.width-carLeft-carRight)/(this.options.thumbwidth+this.options.thumbgap))this.options.thumbTotalWidth)marginL=this.options.thumbMaskWidth/2-this.options.thumbTotalWidth/2-this.options.thumbgap/2;styleCss+=".html5gallery-thumbs-"+this.id+" { position:relative; display:block; margin-left:"+marginL+"px; width:"+String(this.elemArray.length*(this.options.thumbwidth+this.options.thumbgap))+"px; top:"+Math.round(this.options.carouselHeight/2-this.options.thumbheight/2)+"px; }";var maskLeft=Math.round((this.options.width-carLeft-carRight)/2-this.options.thumbMaskWidth/ 2);styleCss+=" .html5gallery-car-mask-"+this.id+" { position:absolute; display:block; text-align:left; overflow:hidden; left:"+maskLeft+"px; width:"+this.options.thumbMaskWidth+"px; top:0px; height:"+this.options.carouselHeight+"px;} ";styleCss+=" .html5gallery-tn-"+this.id+" { display:block; float:left; margin-left:"+Math.floor(this.options.thumbgap/2)+"px; margin-right:"+Math.floor(this.options.thumbgap/2)+"px; text-align:center; cursor:pointer; width:"+this.options.thumbwidth+"px;height:"+this.options.thumbheight+ "px;overflow:hidden;}";if(this.options.thumbshadow)styleCss+=" .html5gallery-tn-"+this.id+" { -moz-box-shadow: 0px 2px 5px #aaa; -webkit-box-shadow: 0px 2px 5px #aaa; box-shadow: 0px 2px 5px #aaa;}";styleCss+=" .html5gallery-tn-selected-"+this.id+" { display:block; float:left; margin-left:"+Math.floor(this.options.thumbgap/2)+"px; margin-right:"+Math.floor(this.options.thumbgap/2)+"px;text-align:center; cursor:pointer; width:"+this.options.thumbwidth+"px;height:"+this.options.thumbheight+"px;overflow:hidden;}"; if(this.options.thumbshadow)styleCss+=" .html5gallery-tn-selected-"+this.id+" { -moz-box-shadow: 0px 2px 5px #aaa; -webkit-box-shadow: 0px 2px 5px #aaa; box-shadow: 0px 2px 5px #aaa;}";styleCss+=" .html5gallery-tn-"+this.id+" {background-color:"+this.options.thumbimagebordercolor+";}"+" .html5gallery-tn-"+this.id+" { filter:alpha(opacity="+Math.round(this.options.thumbopacity*100)+"); opacity:"+this.options.thumbopacity+"; } "+" .html5gallery-tn-selected-"+this.id+" { filter:alpha(opacity=100); opacity:1; } "; styleCss+=" .html5gallery-tn-img-"+this.id+" {display:block; overflow:hidden; width:"+String(this.options.thumbimagewidth+2*this.options.thumbimageborder)+"px;height:"+String(this.options.thumbimageheight+2*this.options.thumbimageborder)+"px;}";if(this.options.thumbunselectedimagebordercolor)styleCss+=" .html5gallery-tn-selected-"+this.id+" {background-color:"+this.options.thumbunselectedimagebordercolor+";}";if(this.options.thumbshowtitle){styleCss+=" .html5gallery-tn-title-"+this.id+" {display:block; overflow:hidden; float:top; height:"+ this.options.thumbtitleheight+"px;width:"+String(this.options.thumbwidth-2)+"px;line-height:"+this.options.thumbtitleheight+"px;}";styleCss+=" .html5gallery-tn-title-"+this.id+this.options.thumbtitlecss}else styleCss+=" .html5gallery-tn-title-"+this.id+" {display:none;}";this.carouselHighlight=function(index,nonanimation){$("#html5gallery-tn-"+this.id+"-"+index,this.$gallery).removeClass("html5gallery-tn-"+this.id).addClass("html5gallery-tn-selected-"+this.id);if(this.options.thumbShowNum>=this.elemArray.length){$(".html5gallery-car-left-"+ this.id,this.$gallery).css({"background-position":"-64px 0px",cursor:""});$(".html5gallery-car-left-"+this.id,this.$gallery).data("disabled",true);$(".html5gallery-car-right-"+this.id,this.$gallery).css({"background-position":"-64px 0px",cursor:""});$(".html5gallery-car-right-"+this.id,this.$gallery).data("disabled",true);return}var pos=Math.floor(index/this.options.thumbShowNum)*this.options.thumbShowNum*(this.options.thumbwidth+this.options.thumbgap);if(pos>=this.options.thumbTotalWidth-this.options.thumbMaskWidth+ this.options.thumbgap)pos=this.options.thumbTotalWidth-this.options.thumbMaskWidth+this.options.thumbgap;pos=-pos;if(nonanimation)$(".html5gallery-thumbs-"+this.id,this.$gallery).css({marginLeft:pos});else $(".html5gallery-thumbs-"+this.id,this.$gallery).animate({marginLeft:pos},500);this.updateCarouseButtons(pos)};this.carouselPrev=function(){var $thumbContainer=$(".html5gallery-thumbs-"+this.id,this.$gallery);if(parseInt($thumbContainer.css("margin-left"))==0)return;else{var pos=-1*parseInt($thumbContainer.css("margin-left"))- this.options.thumbShowNum*(this.options.thumbwidth+this.options.thumbgap);if(pos<0)pos=0;$thumbContainer.animate({marginLeft:-pos},500,this.options.carouseleasing);this.updateCarouseButtons(-pos)}};this.carouselNext=function(){var $thumbContainer=$(".html5gallery-thumbs-"+this.id,this.$gallery);if(parseInt($thumbContainer.css("margin-left"))==-(this.options.thumbTotalWidth-this.options.thumbMaskWidth+this.options.thumbgap))return;else{var pos=-1*parseInt($thumbContainer.css("margin-left"))+this.options.thumbShowNum* (this.options.thumbwidth+this.options.thumbgap);if(pos>=this.options.thumbTotalWidth-this.options.thumbMaskWidth+this.options.thumbgap)pos=this.options.thumbTotalWidth-this.options.thumbMaskWidth+this.options.thumbgap;$thumbContainer.animate({marginLeft:-pos},500,this.options.carouseleasing);this.updateCarouseButtons(-pos)}};this.updateCarouseButtons=function(pos){var $leftButton=$(".html5gallery-car-left-"+this.id,this.$gallery);var $rightButton=$(".html5gallery-car-right-"+this.id,this.$gallery); var rightMost=-1*(this.options.thumbTotalWidth-this.options.thumbMaskWidth+this.options.thumbgap);if(pos==0){$leftButton.css({"background-position":"-64px 0px",cursor:""});$leftButton.data("disabled",true)}else if($leftButton.data("disabled")){$leftButton.css({"background-position":"0px 0px",cursor:"pointer"});$leftButton.data("disabled",false)}if(pos==rightMost){$rightButton.css({"background-position":"-64px 0px",cursor:""});$rightButton.data("disabled",true)}else if($rightButton.data("disabled")){$rightButton.css({"background-position":"0px 0px", cursor:"pointer"});$rightButton.data("disabled",false)}}}else styleCss+=" .html5gallery-car-"+this.id+" { display:none; }";styleCss+=".html5gallery-container-"+this.id+" div {box-sizing:content-box;}";$("head").append("")},loadCarousel:function(){var instance=this;var $thumbContainer=$(".html5gallery-thumbs-"+this.id,this.$gallery);$thumbContainer.empty();for(var i=0;i");$thumb.appendTo($thumbContainer);if(!this.options.thumblinkintitle)$thumb.unbind("click").click(function(event){instance.onThumbClick($(this).data("index"));instance.slideRun($(this).data("index"),true,true)});$thumb.hover(function(){instance.onThumbOver();$(this).removeClass("html5gallery-tn-"+instance.id).addClass("html5gallery-tn-selected-"+instance.id)},function(){if($(this).data("index")!==instance.curElem)$(this).removeClass("html5gallery-tn-selected-"+ instance.id).addClass("html5gallery-tn-"+instance.id)});var imgLoader=new Image;imgLoader.data=i;$(imgLoader).load(function(){var scale=Math.max(instance.options.thumbimagewidth/this.width,instance.options.thumbimageheight/this.height);var w=Math.round(scale*this.width);var h=Math.round(scale*this.height);var videoPlay=instance.options.thumbshowplayonvideo&&instance.elemArray[this.data][ELEM_TYPE]!=1?"
":"";$("#html5gallery-tn-"+instance.id+"-"+this.data,$thumbContainer).append("
"+videoPlay+"
"+instance.elemArray[this.data][ELEM_TITLE]+(instance.options.thumbshowdescription? "
"+instance.elemArray[this.data][ELEM_INFORMATION]+"":"")+"
");if(instance.options.thumblinkintitle){var $thumbImage=$(".html5gallery-tn-img-"+instance.id,$thumbContainer);$thumbImage.unbind("click").click(function(event){instance.onThumbClick($(this).parent().data("index"));instance.slideRun($(this).parent().data("index"),true,true)})}});imgLoader.src=this.elemArray[i][ELEM_THUMBNAIL]}if(this.options.carouselmultirows)$thumbContainer.append("
")}, goNormal:function(){clearTimeout(this.slideshowTimeout);$(document).unbind("keyup.html5gallery");$(".html5gallery-timer-"+this.id,this.$gallery).css({width:0});clearInterval(this.slideTimer);this.slideTimerCount=0;this.isFullscreen=false;var $elem=$(".html5gallery-elem-"+this.id,this.$fullscreen).empty().css({top:this.options.elemTop});$(".html5gallery-box-"+this.id,this.$gallery).prepend($elem);this.slideRun(this.curElem);this.$fullscreen.remove();if(this.options.imagetoolboxmode=="show")this.showimagetoolbox(this.elemArray[this.curElem][ELEM_TYPE]); else this.hideimagetoolbox()},goFullscreen:function(){this.hideimagetoolbox();clearTimeout(this.slideshowTimeout);$(".html5gallery-fullscreen-timer-"+this.id,this.$fullscreen).css({width:0});clearInterval(this.slideTimer);this.slideTimerCount=0;this.isFullscreen=true;this.fullscreenInitial=20;this.fullscreenMargin=this.options.lightboxborder;this.fullscreenBarH=this.options.lightboxtextheight;this.fullscreenOutsideMargin=this.options.lightboxmargin;var fullW=this.options.isMobile?Math.max($(window).width(), $(document).width()):$(window).width();var w=this.elemArray[this.curElem][ELEM_WIDTH],h=this.elemArray[this.curElem][ELEM_HEIGHT];this.fullscreenWidth=fullW-2*this.fullscreenMargin-2*this.fullscreenOutsideMargin;var winH=window.innerHeight?window.innerHeight:$(window).height();this.fullscreenHeight=winH-2*this.fullscreenMargin-this.fullscreenBarH-2*this.fullscreenOutsideMargin;var fullH=Math.max(winH,$(document).height());var scale=Math.min(this.fullscreenWidth/w,this.fullscreenHeight/h);if(scale< 1)w*=scale,h*=scale;var marginT=$(window).scrollTop()+Math.round((winH-(h+2*this.fullscreenMargin+this.fullscreenBarH))/2);this.$fullscreen=$("
"+"
"+ "
"+"
"+"
"+"
"+"
"+"
"+"
"+"
"+"
"+"
"+"
"+"
"+"
"+"
"+"
"+""+""+"
"+"
");this.$fullscreen.appendTo("body");var instance=this;$(window).scroll(function(){var $box=$(".html5gallery-fullscreen-box-"+instance.id, instance.$fullscreen);var winH=window.innerHeight?window.innerHeight:$(window).height();var marginT=$(window).scrollTop()+Math.round((winH-$box.height())/2);$box.css({"top":marginT})});var $elem=$(".html5gallery-elem-"+this.id,this.$gallery).empty().css({top:0,position:"relative"});$(".html5gallery-fullscreen-box-"+this.id,this.$fullscreen).animate({height:h+2*this.fullscreenMargin},"slow",function(){$(this).animate({width:w+2*instance.fullscreenMargin},"slow",function(){$(this).animate({height:"+="+ instance.fullscreenBarH},"slow",function(){$(".html5gallery-fullscreen-elem-wrapper-"+instance.id,instance.$fullscreen).prepend($elem);instance.slideRun(instance.curElem)})})});$(".html5gallery-fullscreen-overlay-"+this.id,this.$fullscreen).click(function(){instance.goNormal()});$(".html5gallery-fullscreen-box-"+this.id,this.$fullscreen).hover(function(){if(instance.elemArray.length>1){$(".html5gallery-fullscreen-next-"+instance.id,instance.$fullscreen).fadeIn();$(".html5gallery-fullscreen-prev-"+ instance.id,instance.$fullscreen).fadeIn()}},function(){$(".html5gallery-fullscreen-next-"+instance.id,instance.$fullscreen).fadeOut();$(".html5gallery-fullscreen-prev-"+instance.id,instance.$fullscreen).fadeOut()});$(".html5gallery-fullscreen-box-"+this.id,this.$fullscreen).touchSwipe({preventWebBrowser:true,swipeLeft:function(){if(!instance.disableTouchSwipe)instance.slideRun(-1)},swipeRight:function(){if(!instance.disableTouchSwipe)instance.slideRun(-2)}});$(".html5gallery-fullscreen-close-"+this.id, this.$fullscreen).click(function(){instance.goNormal()});$(".html5gallery-fullscreen-next-"+this.id,this.$fullscreen).click(function(){instance.slideRun(-1)});$(".html5gallery-fullscreen-prev-"+this.id,this.$fullscreen).click(function(){instance.slideRun(-2)});$(".html5gallery-fullscreen-play-"+this.id,this.$fullscreen).click(function(){$(".html5gallery-fullscreen-play-"+instance.id,instance.$fullscreen).hide();$(".html5gallery-fullscreen-pause-"+instance.id,instance.$fullscreen).show();instance.isPaused= false;var slideshowinterval=instance.elemArray[instance.curElem][ELEM_DURATION]?instance.elemArray[instance.curElem][ELEM_DURATION]:instance.options.slideshowinterval;instance.slideshowTimeout=setTimeout(function(){instance.slideRun(-1)},slideshowinterval);$(".html5gallery-fullscreen-timer-"+instance.id,instance.$fullscreen).css({width:0});instance.slideTimerCount=0;if(instance.options.showtimer)instance.slideTimer=setInterval(function(){instance.showSlideTimer()},50)});$(".html5gallery-fullscreen-pause-"+ this.id,this.$fullscreen).click(function(){$(".html5gallery-fullscreen-play-"+instance.id,instance.$fullscreen).show();$(".html5gallery-fullscreen-pause-"+instance.id,instance.$fullscreen).hide();instance.isPaused=true;clearTimeout(instance.slideshowTimeout);$(".html5gallery-fullscreen-timer-"+instance.id,instance.$fullscreen).css({width:0});clearInterval(instance.slideTimer);instance.slideTimerCount=0});$(document).bind("keyup.html5gallery",function(e){if(e.keyCode==27)instance.goNormal();else if(e.keyCode== 39)instance.slideRun(-1);else if(e.keyCode==37)instance.slideRun(-2)})},calcIndex:function(index){this.savedElem=this.curElem;if(index==-2){this.nextElem=this.curElem;this.curElem=this.prevElem;this.prevElem=this.curElem-1<0?this.elemArray.length-1:this.curElem-1}else if(index==-1){this.prevElem=this.curElem;this.curElem=this.nextElem;this.nextElem=this.curElem+1>=this.elemArray.length?0:this.curElem+1}else if(index>=0){this.curElem=index;this.prevElem=this.curElem-1<0?this.elemArray.length-1:this.curElem- 1;this.nextElem=this.curElem+1>=this.elemArray.length?0:this.curElem+1}},showSlideTimer:function(){var slideshowinterval=this.elemArray[this.curElem][ELEM_DURATION]?this.elemArray[this.curElem][ELEM_DURATION]:this.options.slideshowinterval;this.slideTimerCount++;if(this.isFullscreen)$(".html5gallery-fullscreen-timer-"+this.id,this.$fullscreen).width(Math.round($(".html5gallery-fullscreen-elem-wrapper-"+this.id,this.$fullscreen).width()*50*(this.slideTimerCount+1)/slideshowinterval));else $(".html5gallery-timer-"+ this.id,this.$gallery).width(Math.round(this.options.boxWidth*50*(this.slideTimerCount+1)/slideshowinterval))},setHd:function(isHd,switching){var type=this.elemArray[this.curElem][ELEM_TYPE];var toSwitch=this.isHd!=isHd&&switching&&(type==TYPE_VIDEO_FLASH||type==TYPE_VIDEO_MP4||type==TYPE_VIDEO_OGG||type==TYPE_VIDEO_WEBM);this.isHd=isHd;if(toSwitch)this.slideRun(this.curElem,false,false,true)},enableUpdateCarousel:function(){this.disableupdatecarousel=false},slideRun:function(index,navClicked,thumbClicked, videoSwitching){clearTimeout(this.slideshowTimeout);if(this.isFullscreen)$(".html5gallery-fullscreen-timer-"+this.id,this.$fullscreen).css({width:0});else $(".html5gallery-timer-"+this.id,this.$gallery).css({width:0});clearInterval(this.slideTimer);this.slideTimerCount=0;if(this.options.showcarousel&&this.curElem>=0)$("#html5gallery-tn-"+this.id+"-"+this.curElem,this.$gallery).removeClass("html5gallery-tn-selected-"+this.id).addClass("html5gallery-tn-"+this.id);this.calcIndex(index);if(this.options.socialurlforeach)this.createSocialMedia(); if(!this.isFullscreen&&this.options.showcarousel){$("#html5gallery-tn-"+this.id+"-"+this.curElem,this.$gallery).removeClass("html5gallery-tn-"+this.id).addClass("html5gallery-tn-selected-"+this.id);if(!this.options.notupdatecarousel&&!this.disableupdatecarousel)this.carouselHighlight(this.curElem)}if(this.options.showtitle||this.options.lightboxshowtitle||this.options.lightboxshowdescription){var title=this.elemArray[this.curElem][ELEM_TITLE];var description=this.elemArray[this.curElem][ELEM_INFORMATION]; if(this.options.shownumbering)title=this.options.numberingformat.replace("%NUM",this.curElem+1).replace("%TOTAL",this.elemArray.length)+" "+title;if(this.isFullscreen){var fullscreentitle="";if(this.options.lightboxshowtitle&&title)fullscreentitle+=title;if(this.options.lightboxshowdescription&&description)fullscreentitle+="
"+description+"
";$(".html5gallery-fullscreen-title-"+this.id,this.$fullscreen).html(fullscreentitle)}else if(this.options.showtitle){var titleHtml= "
"+title+"
";if(this.options.showdescription&&description)titleHtml+="
"+description+"
";$(".html5gallery-title-"+this.id,this.$gallery).html(titleHtml)}}var type=this.elemArray[this.curElem][ELEM_TYPE];if(type<0)return;if(!this.isFullscreen&&navClicked)if(this.options.showimagetoolbox=="always"){if(this.options.imagetoolboxmode=="mouseover"||this.options.imagetoolboxmode=="show")this.showimagetoolbox(type)}else{if(this.options.showimagetoolbox== "image"&&type!=TYPE_IMAGE)this.hideimagetoolbox()}else if(this.options.imagetoolboxmode=="show")this.showimagetoolbox(type);else this.hideimagetoolbox();this.onChange();var $elem=$(".html5gallery-elem-"+this.id,parent);$elem.find("iframe").each(function(){$(this).attr("src","")});$elem.find("video").each(function(){$(this).attr("src","")});this.disableTouchSwipe=false;var playVideo=this.options.autoplayvideo||this.options.playvideoonclick&&thumbClicked||videoSwitching;var parent=this.isFullscreen? this.$fullscreen:this.$gallery;this.showingPoster=false;if((type==TYPE_VIDEO_FLASH||type==TYPE_VIDEO_MP4||type==TYPE_VIDEO_OGG||type==TYPE_VIDEO_WEBM||type==TYPE_VIDEO_YOUTUBE||type==TYPE_VIDEO_VIMEO||type==TYPE_EMBED_VIDEO)&&!playVideo&&this.elemArray[this.curElem][ELEM_POSTER]){this.showingPoster=true;this.showPoster()}else{if($(".html5gallery-video-play-"+this.id,parent).length)$(".html5gallery-video-play-"+this.id,parent).remove();if(type==TYPE_IMAGE)this.showImage();else if(type==TYPE_VIDEO_FLASH|| type==TYPE_VIDEO_MP4||type==TYPE_VIDEO_OGG||type==TYPE_VIDEO_WEBM)this.showVideo(playVideo,videoSwitching);else if(type==TYPE_VIDEO_YOUTUBE)this.showYoutube(playVideo);else if(type==TYPE_VIDEO_VIMEO)this.showVimeo(playVideo);else if(type==TYPE_EMBED_VIDEO)this.showEmbedVideo(playVideo);else if(type==TYPE_SWF)this.showSWF();else if(type==TYPE_IFRAME)this.showIframe()}if(this.prevElem in this.elemArray&&this.elemArray[this.prevElem][ELEM_TYPE]==1)(new Image).src=this.elemArray[this.prevElem][ELEM_SRC]; if(this.nextElem in this.elemArray&&this.elemArray[this.nextElem][ELEM_TYPE]==1)(new Image).src=this.elemArray[this.nextElem][ELEM_SRC];if(this.prevElem in this.elemArray&&!this.options.autoplayvideo&&this.elemArray[this.prevElem][ELEM_POSTER])(new Image).src=this.elemArray[this.prevElem][ELEM_POSTER];if(this.nextElem in this.elemArray&&!this.options.autoplayvideo&&this.elemArray[this.nextElem][ELEM_POSTER])(new Image).src=this.elemArray[this.nextElem][ELEM_POSTER];if(this.curElem==this.elemArray.length- 1)this.looptimes++;var instance=this;if((type==TYPE_IMAGE||this.showingPoster)&&!this.isPaused&&this.elemArray.length>1&&(!this.options.loop||this.looptimes=this.options.loop){this.looptimes=0;this.pauseGallery()}if(this.elemArray[this.curElem][ELEM_LINK]){$elem.css({cursor:"pointer"});$elem.unbind("click").bind("click",function(){if(instance.elemArray[instance.curElem][ELEM_LINKTARGET])window.open(instance.elemArray[instance.curElem][ELEM_LINK], instance.elemArray[instance.curElem][ELEM_LINKTARGET]);else window.open(instance.elemArray[instance.curElem][ELEM_LINK])})}else{$elem.css({cursor:""});$elem.unbind("click")}},showImage:function(){var parent=this.isFullscreen?this.$fullscreen:this.$gallery;var $elem=$(".html5gallery-elem-"+this.id,parent);if($elem.html()==="")$preloading=$("
").appendTo($elem);else $preloading=$("
").appendTo($elem); var instance=this;var imgLoader=new Image;$(imgLoader).load(function(){$preloading.remove();instance.elemArray[instance.curElem][ELEM_WIDTH]=this.width;instance.elemArray[instance.curElem][ELEM_HEIGHT]=this.height;var scale;if(instance.isFullscreen){scale=Math.min(instance.fullscreenWidth/this.width,instance.fullscreenHeight/this.height);scale=scale>1?1:scale}else if(instance.options.resizemode=="fill")scale=Math.max(instance.options.width/this.width,instance.options.height/this.height);else scale= Math.min(instance.options.width/this.width,instance.options.height/this.height);var w=Math.round(scale*this.width);var h=Math.round(scale*this.height);var w1=instance.isFullscreen?w:instance.options.width;var h1=instance.isFullscreen?h:instance.options.height;var l=Math.round(w1/2-w/2);var t=Math.round(h1/2-h/2);if(instance.isFullscreen)instance.adjustFullscreen(w1,h1);$elem.css({"width":w1,"height":h1});var $imgCur=$("
"+ instance.options.watermarkcode+"
");var $imgPrev=$(".html5gallery-elem-img-"+instance.id,$elem);if($imgPrev.length){$elem.prepend($imgCur);$elem.html5boxTransition(instance.id,$imgPrev,$imgCur,{effect:instance.options.effect,easing:instance.options.easing,duration:instance.options.duration,direction:instance.curElem>=instance.savedElem,slide:instance.options.slide},function(){})}else $elem.html($imgCur);if(instance.options.googleanalyticsaccount&&window._gaq)window._gaq.push(["_trackEvent","Image", "Play",instance.elemArray[instance.curElem][ELEM_SRC]])});$(imgLoader).error(function(){$preloading.remove();if(instance.isFullscreen)instance.adjustFullscreen(instance.options.width,instance.options.height);$elem.html("
The requested content cannot be found
");if(instance.options.googleanalyticsaccount&&window._gaq)window._gaq.push(["_trackEvent","Image","Error",instance.elemArray[instance.curElem][ELEM_SRC]])});imgLoader.src=this.elemArray[this.curElem][ELEM_SRC]},adjustFullscreen:function(w1,h1,noanimation){var fullW=this.options.isMobile?Math.max($(window).width(),$(document).width()):$(window).width();this.fullscreenWidth=fullW-2*this.fullscreenMargin-2*this.fullscreenOutsideMargin;var winH=window.innerHeight? window.innerHeight:$(window).height();this.fullscreenHeight=winH-2*this.fullscreenMargin-this.fullscreenBarH-2*this.fullscreenOutsideMargin;var fullH=Math.max(winH,$(document).height());var scale=Math.min(this.fullscreenWidth/w1,this.fullscreenHeight/h1);if(scale<1)w1*=scale,h1*=scale;var marginT=$(window).scrollTop()+Math.round((winH-(h1+2*this.fullscreenMargin+this.fullscreenBarH))/2);$(".html5gallery-fullscreen-"+this.id).css({width:fullW+"px",height:fullH+"px"});$(".html5gallery-fullscreen-title-"+ this.id,this.$fullscreen).css({"width":w1-2*this.fullscreenMargin-72});if(noanimation){$(".html5gallery-fullscreen-box-"+this.id,this.$fullscreen).css({"width":w1+2*this.fullscreenMargin,"height":h1+2*this.fullscreenMargin+this.fullscreenBarH,"top":marginT});$(".html5gallery-fullscreen-elem-"+this.id,this.$fullscreen).css({"width":w1+2*this.fullscreenMargin,"height":h1+2*this.fullscreenMargin});$(".html5gallery-fullscreen-elem-wrapper-"+this.id,this.$fullscreen).css({"width":w1,"height":h1});$(".html5gallery-fullscreen-bar-"+ this.id,this.$fullscreen).css({"width":w1+2*this.fullscreenMargin})}else{$(".html5gallery-fullscreen-box-"+this.id,this.$fullscreen).animate({"width":w1+2*this.fullscreenMargin,"height":h1+2*this.fullscreenMargin+this.fullscreenBarH,"top":marginT},"slow");$(".html5gallery-fullscreen-elem-"+this.id,this.$fullscreen).animate({"width":w1+2*this.fullscreenMargin,"height":h1+2*this.fullscreenMargin},"slow");$(".html5gallery-fullscreen-elem-wrapper-"+this.id,this.$fullscreen).animate({"width":w1,"height":h1}, "slow");$(".html5gallery-fullscreen-bar-"+this.id,this.$fullscreen).animate({"width":w1+2*this.fullscreenMargin},"slow")}$(".html5gallery-fullscreen-next-"+this.id,this.$fullscreen).css({"top":Math.round(h1/2)});$(".html5gallery-fullscreen-prev-"+this.id,this.$fullscreen).css({"top":Math.round(h1/2)});$(".html5gallery-fullscreen-play-"+this.id,this.$fullscreen).css("display",this.isPaused&&this.elemArray.length>1&&this.elemArray[this.curElem][ELEM_TYPE]==1?"block":"none");$(".html5gallery-fullscreen-pause-"+ this.id,this.$fullscreen).css("display",this.isPaused||this.elemArray.length<=1||this.elemArray[this.curElem][ELEM_TYPE]!=1?"none":"block");$(".html5gallery-elem-"+this.id,this.$fullscreen).css({"width":w1,"height":h1});$(".html5gallery-fullscreen-timer-"+this.id,this.$fullscreen).css({top:String(h1-4)+"px"});$(".html5gallery-elem-video-"+this.id,this.$fullscreen).css({"width":w1+"px","height":h1+"px"});$(".html5gallery-elem-video-container-"+this.id,this.$fullscreen).css({"width":w1+"px","height":h1+ "px"});var h2=this.options.isIPhone?h1-48:h1;$(".html5gallery-elem-video-container-"+this.id,this.$fullscreen).find("video").css({"width":w1+"px","height":h2+"px"});$("#html5gallery-elem-video-"+this.id,this.$fullscreen).css({"width":w1+"px","height":h1+"px"});$("#html5gallery-elem-video-"+this.id,this.$fullscreen).attr("width",w1);$("#html5gallery-elem-video-"+this.id,this.$fullscreen).attr("height",h1);$(".html5gallery-elem-video-"+this.id,this.$fullscreen).find("iframe").attr("width",w1);$(".html5gallery-elem-video-"+ this.id,this.$fullscreen).find("iframe").attr("height",h1);$("#html5gallery-elem-video-"+this.id,this.$fullscreen).find("iframe").attr("width",w1);$("#html5gallery-elem-video-"+this.id,this.$fullscreen).find("iframe").attr("height",h1)},showPoster:function(){var parent=this.isFullscreen?this.$fullscreen:this.$gallery;var $elem=$(".html5gallery-elem-"+this.id,parent);if($elem.html()==="")$preloading=$("
").appendTo($elem);else $preloading=$("
").appendTo($elem);var instance=this;var dataW=this.elemArray[this.curElem][ELEM_WIDTH];var dataH=this.elemArray[this.curElem][ELEM_HEIGHT];var imgLoader=new Image;$(imgLoader).load(function(){$preloading.remove();var scale,w1,h1;if(instance.isFullscreen){scale=Math.max(dataW/this.width,dataH/this.height);scale=scale>1?1:scale;w1=dataW;h1=dataH}else{if(instance.options.resizemode=="fill")scale=Math.max(instance.options.width/this.width,instance.options.height/this.height);else scale= Math.min(instance.options.width/this.width,instance.options.height/this.height);w1=instance.options.width;h1=instance.options.height}var w=Math.round(scale*this.width);var h=Math.round(scale*this.height);var l=Math.round(w1/2-w/2);var t=Math.round(h1/2-h/2);if(instance.isFullscreen)instance.adjustFullscreen(w1,h1);$elem.css({"width":w1,"height":h1});var $imgCur=$("
"+instance.options.watermarkcode+ "
");var $imgPrev=$(".html5gallery-elem-img-"+instance.id,$elem);if($imgPrev.length){$elem.prepend($imgCur);$elem.html5boxTransition(instance.id,$imgPrev,$imgCur,{effect:instance.options.effect,easing:instance.options.easing,duration:instance.options.duration,direction:instance.curElem>=instance.savedElem,slide:instance.options.slide},function(){})}else $elem.html($imgCur);if(!$(".html5gallery-video-play-"+instance.id,parent).length){var $play=$("
").appendTo($elem);$play.unbind(instance.eClick).bind(instance.eClick,function(){$(this).remove();clearTimeout(instance.slideshowTimeout);$(".html5gallery-timer-"+instance.id,instance.$gallery).css({width:0});clearInterval(instance.slideTimer);instance.slideTimerCount= 0;instance.showingPoster=false;var type=instance.elemArray[instance.curElem][ELEM_TYPE];if(type==TYPE_VIDEO_FLASH||type==TYPE_VIDEO_MP4||type==TYPE_VIDEO_OGG||type==TYPE_VIDEO_WEBM)instance.showVideo(true);else if(type==TYPE_VIDEO_YOUTUBE)instance.showYoutube(true);else if(type==TYPE_VIDEO_VIMEO)instance.showVimeo(true);else if(type==TYPE_EMBED_VIDEO)instance.showEmbedVideo(true)})}});$(imgLoader).error(function(){$preloading.remove();if(instance.isFullscreen)instance.adjustFullscreen(instance.options.width, instance.options.height);$elem.html("
The requested content cannot be found
");if(instance.options.googleanalyticsaccount&&window._gaq)window._gaq.push(["_trackEvent","Image","Error",instance.elemArray[instance.curElem][ELEM_POSTER]])}); imgLoader.src=this.elemArray[this.curElem][ELEM_POSTER]},showVideo:function(autoPlay,videoSwitching){this.disableTouchSwipe=true;var parent=this.isFullscreen?this.$fullscreen:this.$gallery;var dataW=this.elemArray[this.curElem][ELEM_WIDTH];var dataH=this.elemArray[this.curElem][ELEM_HEIGHT];var w1,h1;if(this.isFullscreen){this.adjustFullscreen(dataW,dataH);w1=dataW;h1=dataH}else{$(".html5gallery-elem-"+this.id,this.$gallery).css({"width":this.options.width,"height":this.options.height});w1=this.options.width; h1=this.options.height}var timeStamp=-1;if(videoSwitching&&$(".html5gallery-elem-"+this.id,parent).find("video").length)timeStamp=$(".html5gallery-elem-"+this.id,parent).find("video:first").get(0).currentTime;$(".html5gallery-elem-"+this.id,parent).html("
"+this.options.watermarkcode);this.isHTML5=false;if(this.options.isIE678||this.options.isIE9&&this.options.useflashonie9||this.options.isIE10&&this.options.useflashonie10||this.options.isIE11&&this.options.useflashonie11)this.isHTML5=false;else if(this.options.isMobile)this.isHTML5=true;else if((this.options.html5player||!this.options.flashInstalled)&&this.options.html5VideoSupported)if(!this.options.isFirefox&&!this.options.isOpera|| (this.options.isFirefox||this.options.isOpera)&&(this.elemArray[this.curElem][ELEM_SRC_OGG]||this.elemArray[this.curElem][ELEM_SRC_WEBM]))this.isHTML5=true;if(this.isHTML5){var videoSrc=this.elemArray[this.curElem][ELEM_SRC];var videoHd=this.elemArray[this.curElem][ELEM_HD];if(this.options.isFirefox||this.options.isOpera||!videoSrc){videoSrc=this.elemArray[this.curElem][ELEM_SRC_WEBM]?this.elemArray[this.curElem][ELEM_SRC_WEBM]:this.elemArray[this.curElem][ELEM_SRC_OGG];videoHd=this.elemArray[this.curElem][ELEM_HD_WEBM]? this.elemArray[this.curElem][ELEM_HD_WEBM]:this.elemArray[this.curElem][ELEM_HD_OGG]}this.embedHTML5Video($(".html5gallery-elem-video-"+this.id,parent),w1,h1,videoSrc,videoHd,autoPlay,timeStamp,videoSwitching)}else{var videoFile=this.elemArray[this.curElem][ELEM_SRC];if(videoFile.charAt(0)!="/"&&videoFile.substring(0,5)!="http:"&&videoFile.substring(0,6)!="https:")videoFile=this.options.htmlfolder+videoFile;var hdFile="";if(this.elemArray[this.curElem][ELEM_HD]){hdFile=this.elemArray[this.curElem][ELEM_HD]; if(hdFile.charAt(0)!="/"&&hdFile.substring(0,5)!="http:"&&hdFile.substring(0,6)!="https:")hdFile=this.options.htmlfolder+hdFile}this.embedFlash($(".html5gallery-elem-video-"+this.id,parent),"100%","100%",this.options.jsfolder+"html5boxplayer.swf","transparent",{width:w1,height:h1,hidecontrols:this.options.videohidecontrols?"1":"0",hideplaybutton:"0",videofile:videoFile,hdfile:hdFile,ishd:this.isHd?"1":"0",autoplay:autoPlay?"1":"0",errorcss:".html5box-error"+this.options.errorcss,id:this.id})}if(this.options.googleanalyticsaccount&& window._gaq)window._gaq.push(["_trackEvent","Video","Play",this.elemArray[this.curElem][ELEM_SRC]])},showSWF:function(){var parent=this.isFullscreen?this.$fullscreen:this.$gallery;var w1=this.elemArray[this.curElem][ELEM_WIDTH];var h1=this.elemArray[this.curElem][ELEM_HEIGHT];if(this.isFullscreen)this.adjustFullscreen(w1,h1);else $(".html5gallery-elem-"+this.id,this.$gallery).css({"width":this.options.width,"height":this.options.height});var t1=this.isFullscreen?0:Math.round((this.options.height- h1)/2)+(this.options.slideshadow?4:0);var l1=this.isFullscreen?0:Math.round((this.options.width-w1)/2)+(this.options.slideshadow?4:0);$(".html5gallery-elem-"+this.id,parent).html("
"+this.options.watermarkcode);this.embedFlash($(".html5gallery-elem-flash-"+this.id,parent),w1,h1,this.elemArray[this.curElem][ELEM_SRC],"window",{});if(this.options.googleanalyticsaccount&& window._gaq)window._gaq.push(["_trackEvent","Flash","Play",this.elemArray[this.curElem][ELEM_SRC]])},prepareYoutubeHref:function(href){var youtubeId=href.match(/(\?v=|\/\d\/|\/embed\/|\/v\/|\.be\/)([a-zA-Z0-9\-\_]+)/)[2];var result=("https:"==document.location.protocol?"https:":"http:")+"//www.youtube.com/embed/"+youtubeId;var params=this.getYoutubeParams(href);var first=true;for(var key in params){if(first){result+="?";first=false}else result+="&";result+=key+"="+params[key]}return result},getYoutubeParams:function(href){var result= {};if(href.indexOf("?")<0)return result;var params=href.substring(href.indexOf("?")+1).split("&");for(var i=0;i
"+this.options.watermarkcode);if(src.match(/\:\/\/.*(dai\.ly)/i)){var id=src.match(/(dai\.ly\/)([a-zA-Z0-9\-\_]+)/)[2];src=(src.match(/https\:\/\//i)?"https": "http")+"://www.dailymotion.com/embed/video/"+id}if(autoPlay)if(src.indexOf("?")<0)src+="?autoplay=1";else src+="&autoplay=1";$("#html5gallery-elem-video-"+this.id,parent).html("");if(this.options.googleanalyticsaccount&&window._gaq)window._gaq.push(["_trackEvent","Video","Play",this.elemArray[this.curElem][ELEM_SRC]])},showYoutube:function(autoPlay){var parent=this.isFullscreen? this.$fullscreen:this.$gallery;var dataW=this.elemArray[this.curElem][ELEM_WIDTH];var dataH=this.elemArray[this.curElem][ELEM_HEIGHT];var w1,h1;if(this.isFullscreen){this.adjustFullscreen(dataW,dataH);w1=dataW;h1=dataH}else{$(".html5gallery-elem-"+this.id,this.$gallery).css({"width":this.options.width,"height":this.options.height});w1=this.options.width;h1=this.options.height}var src=this.elemArray[this.curElem][ELEM_SRC];$(".html5gallery-elem-"+this.id,parent).html("
"+this.options.watermarkcode);var instance=this;if(!ASYouTubeIframeAPIReady){ASYouTubeTimeout+=100;if(ASYouTubeTimeout<3E3){setTimeout(function(){instance.showYoutube(autoPlay)},100);return}}if(ASYouTubeIframeAPIReady&&!this.options.isMobile&& !this.options.isIE6&&!this.options.isIE7){var id=this.elemArray[this.curElem][ELEM_SRC].match(/(\?v=|\/\d\/|\/embed\/|\/v\/|\.be\/)([a-zA-Z0-9\-\_]+)/)[2];var onPlayReady=null;if(autoPlay)onPlayReady=function(event){event.target.playVideo()};var youtubeParams=this.getYoutubeParams(this.elemArray[this.curElem][ELEM_SRC]);youtubeParams=$.extend({"html5":1,"controls":instance.options.videohidecontrols?"0":"1","showinfo":instance.options.videohidecontrols?"0":"1","autoplay":autoPlay?1:0,"rel":0,"wmode":"transparent"}, youtubeParams);new YT.Player("html5gallery-elem-video-"+this.id,{width:w1,height:h1,videoId:id,playerVars:youtubeParams,events:{"onReady":onPlayReady,"onStateChange":function(event){if(event.data==YT.PlayerState.ENDED){instance.onVideoEnd();if(!instance.isPaused)instance.slideRun(-1)}}}})}else{src=this.prepareYoutubeHref(src);if(autoPlay)if(src.indexOf("?")<0)src+="?autoplay=1";else src+="&autoplay=1";if(src.indexOf("?")<0)src+="?wmode=transparent&rel=0";else src+="&wmode=transparent&rel=0";if(instance.options.videohidecontrols)src+= "&controls=0&showinfo=0";$("#html5gallery-elem-video-"+this.id,parent).html("")}if(this.options.googleanalyticsaccount&&window._gaq)window._gaq.push(["_trackEvent","Video","Play",this.elemArray[this.curElem][ELEM_SRC]])},showVimeo:function(autoPlay){var instance=this;if(typeof $f!=="function"){ASVimeoTimeout+=100;if(ASVimeoTimeout<3E3){setTimeout(function(){instance.showVimeo(autoPlay)}, 100);return}}var parent=this.isFullscreen?this.$fullscreen:this.$gallery;var dataW=this.elemArray[this.curElem][ELEM_WIDTH];var dataH=this.elemArray[this.curElem][ELEM_HEIGHT];var w1,h1;if(this.isFullscreen){this.adjustFullscreen(dataW,dataH);w1=dataW;h1=dataH}else{$(".html5gallery-elem-"+this.id,this.$gallery).css({"width":this.options.width,"height":this.options.height});w1=this.options.width;h1=this.options.height}var src=this.elemArray[this.curElem][ELEM_SRC];if(src.indexOf("?")<0)src+="?";else src+= "&";if(autoPlay&&!this.options.isAndroid)src+="autoplay=1";else src+="autoplay=0";src+="&api=1&player_id=html5gallery_vimeo_"+this.id;$(".html5gallery-elem-"+this.id,parent).html("
"+ this.options.watermarkcode);$(".html5gallery-elem-video-"+this.id,parent).html("");if(typeof $f==="function"&&autoPlay&&!this.options.isAndroid){var vimeoIframe=$("#html5gallery_vimeo_"+this.id)[0];var vimeoPlayer=$f(vimeoIframe);var instance=this;vimeoPlayer.addEvent("ready",function(){vimeoPlayer.addEvent("finish",function(id){instance.onVideoEnd(); if(!instance.isPaused)instance.slideRun(-1)})})}if(this.options.googleanalyticsaccount&&window._gaq)window._gaq.push(["_trackEvent","Video","Play",this.elemArray[this.curElem][ELEM_SRC]])},showIframe:function(){var parent=this.isFullscreen?this.$fullscreen:this.$gallery;var dataW=this.elemArray[this.curElem][ELEM_WIDTH];var dataH=this.elemArray[this.curElem][ELEM_HEIGHT];var w1,h1;if(this.isFullscreen){this.adjustFullscreen(dataW,dataH);w1=dataW;h1=dataH}else{$(".html5gallery-elem-"+this.id,this.$gallery).css({"width":this.options.width, "height":this.options.height});w1=this.options.width;h1=this.options.height}var src=this.elemArray[this.curElem][ELEM_SRC];$(".html5gallery-elem-"+this.id,parent).html("
"+this.options.watermarkcode); $(".html5gallery-elem-iframe-"+this.id,parent).html("");if(this.options.googleanalyticsaccount&&window._gaq)window._gaq.push(["_trackEvent","Iframe","Play",this.elemArray[this.curElem][ELEM_SRC]])},checkType:function(href){if(!href)return-1;if(href.match(/\.(jpg|gif|png|bmp|jpeg)(.*)?$/i))return TYPE_IMAGE;if(href.match(/[^\.]\.(swf)\s*$/i))return TYPE_SWF; if(href.match(/[^\.]\.(mp3)\s*$/i))return TYPE_MP3;if(href.match(/[^\.]\.(pdf)\s*$/i))return TYPE_PDF;if(href.match(/\.(flv)(.*)?$/i))return TYPE_VIDEO_FLASH;if(href.match(/\.(mp4|m4v)(.*)?$/i))return TYPE_VIDEO_MP4;if(href.match(/\.(ogv|ogg)(.*)?$/i))return TYPE_VIDEO_OGG;if(href.match(/\.(webm)(.*)?$/i))return TYPE_VIDEO_WEBM;if(href.match(/\:\/\/.*(youtube\.com)/i)||href.match(/\:\/\/.*(youtu\.be)/i))return TYPE_VIDEO_YOUTUBE;if(href.match(/\:\/\/.*(vimeo\.com)/i))return TYPE_VIDEO_VIMEO;if(href.match(/\:\/\/.*(dailymotion\.com)/i)|| href.match(/\:\/\/.*(dai\.ly)/i))return TYPE_EMBED_VIDEO;return 0},onChange:function(){if(this.options.onchange&&window[this.options.onchange]&&typeof window[this.options.onchange]=="function")window[this.options.onchange](this.elemArray[this.curElem].concat([this.id]))},onSlideshowOver:function(){if(this.options.onslideshowover&&window[this.options.onslideshowover]&&typeof window[this.options.onslideshowover]=="function")window[this.options.onslideshowover](this.elemArray[this.curElem])},onThumbOver:function(){if(this.options.onthumbover&& window[this.options.onthumbover]&&typeof window[this.options.onthumbover]=="function")window[this.options.onthumbover](this.elemArray[this.curElem])},onThumbClick:function(index){if(this.options.onthumbclick&&window[this.options.onthumbclick]&&typeof window[this.options.onthumbclick]=="function")window[this.options.onthumbclick](this.elemArray[index].concat([this.id]));if(this.options.thumbjumptotop)if(this.options.thumbjumpposition>=0)$(window).scrollTop(this.options.thumbjumpposition);else{var t= this.container.offset().top;if(t<$(window).scrollTop())$(window).scrollTop(t)}},onVideoEnd:function(){if(this.options.onvideoend&&window[this.options.onvideoend]&&typeof window[this.options.onvideoend]=="function")window[this.options.onvideoend](this.elemArray[this.curElem])},embedHTML5Video:function($container,w,h,src,hd,autoPlay,timeStamp,videoSwitching){$container.html("
");$("video",$container).get(0).setAttribute("src",(hd&&this.isHd?hd:src)+(timeStamp>0?"#t="+timeStamp:""));if(!this.options.nativehtml5controls&&!this.options.videohidecontrols){$("video",$container).data("src",src);$("video",$container).data("hd",hd);$("video",$container).data("ishd",this.isHd);$("video",$container).addHTML5VideoControls(this.options.skinfolder, this)}if(autoPlay||videoSwitching)$("video",$container).get(0).play();var instance=this;$("video",$container).unbind("ended").bind("ended",function(){instance.onVideoEnd();if(!instance.isPaused)instance.slideRun(-1)})},embedFlash:function($container,w,h,src,wmode,flashVars){if(this.options.flashInstalled){var htmlOptions={pluginspage:"http://www.adobe.com/go/getflashplayer",quality:"high",allowFullScreen:"true",allowScriptAccess:"always",type:"application/x-shockwave-flash"};htmlOptions.width=w;htmlOptions.height= h;htmlOptions.src=src;htmlOptions.wmode=wmode;htmlOptions.flashVars=$.param(flashVars);var htmlString="";for(var key in htmlOptions)htmlString+=key+"="+htmlOptions[key]+" ";$container.html("")}else $container.html("
The required Adobe Flash Player plugin is not installed
Get Adobe Flash player
")}}; this.each(function(){var $this=$(this);options=options||{};for(var key in options)if(key.toLowerCase()!==key){options[key.toLowerCase()]=options[key];delete options[key]}this.options=$.extend({},options);var instance=this;$.each($this.data(),function(key,value){instance.options[key.toLowerCase()]=value});if("skin"in this.options)this.options.skin=this.options.skin.toLowerCase();var commonOptions={freelink:"http://www.wonderplugin.com/wordpress-gallery/",watermark:"",watermarklink:"",skin:"horizontal", googlefonts:"",enabletouchswipe:true,enabletouchswipeonandroid:true,responsive:false,responsivefullscreen:false,screenquery:{},src:"",xml:"",xmlnocache:true,autoslide:false,slideshowinterval:6E3,random:false,borderradius:0,loop:0,notupdatecarousel:false,updatecarouselinterval:6E4,autoplayvideo:false,html5player:true,playvideoonclick:true,videohidecontrols:false,nativehtml5controls:false,hddefault:false,useflashonie9:true,useflashonie10:false,useflashonie11:false,lightboxborder:8,lightboxtextheight:72, lightboxmargin:12,lightboxbgcolor:"#fff",lightboxshowtitle:true,lightboxtitlecss:" {color:#333333; font:bold 12px Arial,Helvetica,sans-serif; overflow:hidden; white-space:normal; line-height:18px;}",lightboxtitlelinkcss:" a {color:#333333;}",lightboxshowdescription:true,lightboxdescriptioncss:" {color:#333333; font:normal 12px Arial,Helvetica,sans-serif; overflow:hidden; white-space:normal; line-height:14px;}",lightboxdescriptionlinkcss:" a {color:#333333;}",effect:"fade",easing:"easeOutCubic",duration:1500, slide:{duration:1E3,easing:"easeOutExpo"},width:480,height:270,showtimer:true,resizemode:"fit",showtitle:true,titleheight:45,errorcss:" {text-align:center; color:#ff0000; font-size:14px; font-family:Arial, sans-serif;}",shownumbering:false,numberingformat:"%NUM / %TOTAL",googleanalyticsaccount:"",showsocialmedia:false,socialheight:30,socialurlforeach:false,showfacebooklike:true,facebooklikeurl:"",showtwitter:true,twitterurl:"",twitterusername:"",twittervia:"html5box",showgoogleplus:true,googleplusurl:"", showimagetoolbox:"always",imagetoolboxstyle:"side",imagetoolboxmode:"mouseover",showplaybutton:true,showprevbutton:true,shownextbutton:true,showfullscreenbutton:true,carouselbgtransparent:true,carouselbgcolorstart:"#ffffff",carouselbgcolorend:"#ffffff",carouseltopborder:"#ffffff",carouselbottomborder:"#ffffff",carouselbgimage:"",carouseleasing:"easeOutCirc",carouselmultirows:false,thumbrowgap:16,thumblinkintitle:false,thumbjumptotop:false,thumbjumpposition:-1,version:"3.6",fv:true,fm:"87,111,114,100,80,114,101,115,115,32,71,97,108,108,101,114,121,32,70,114,101,101,32,86,101,114,115,105,111,110"}; var horizontalSkinOptions={skinfolder:"skins/horizontal/",padding:6,bgcolor:"#ffffff",bgimage:"",galleryshadow:true,slideshadow:false,showsocialmedia:false,headerpos:"top",showdescription:true,titleoverlay:true,titleautohide:true,titlecss:" {color:#ffffff; font-size:14px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; text-align:left; padding:10px 0px 10px 10px; background:rgb(102, 102, 102) transparent; background: rgba(102, 102, 102, 0.6); filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr=#99666666, endColorstr=#99666666)'; -ms-filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr=#99666666, endColorstr=#99666666)'; }", titlecsslink:" a {color:#ffffff;}",descriptioncss:" {color:#ffffff; font-size:13px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; text-align:left; padding:0px 0px 10px 10px; background:rgb(102, 102, 102) transparent; background: rgba(102, 102, 102, 0.6); filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr=#99666666, endColorstr=#99666666)'; -ms-filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr=#99666666, endColorstr=#99666666)'; }",descriptioncsslink:" a {color:#ffffff;}", showcarousel:true,carouselmargin:0,carouselbgtransparent:false,carouselbgcolorstart:"#494f54",carouselbgcolorend:"#292c31",carouseltopborder:"#666666",carouselbottomborder:"#111111",thumbwidth:64,thumbheight:48,thumbgap:4,thumbmargin:6,thumbunselectedimagebordercolor:"#ffffff",thumbimageborder:1,thumbimagebordercolor:"",thumbshowplayonvideo:true,thumbshadow:false,thumbopacity:0.8};var lightSkinOptions={padding:12,skinfolder:"skins/light/",bgcolor:"",bgimage:"",galleryshadow:false,slideshadow:true, showsocialmedia:false,headerpos:"top",showdescription:true,titleoverlay:true,titleautohide:true,titlecss:" {color:#ffffff; font-size:14px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; white-space:normal; text-align:left; padding:10px 0px 10px 10px; background:rgb(102, 102, 102) transparent; background: rgba(102, 102, 102, 0.6); filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr=#99666666, endColorstr=#99666666)'; -ms-filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr=#99666666, endColorstr=#99666666)'; }", titlecsslink:" a {color:#ffffff;}",descriptioncss:" {color:#ffffff; font-size:12px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; white-space:normal; text-align:left; padding:0px 0px 10px 10px; background:rgb(102, 102, 102) transparent; background: rgba(102, 102, 102, 0.6); filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr=#99666666, endColorstr=#99666666)'; -ms-filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr=#99666666, endColorstr=#99666666)'; }",descriptioncsslink:" a {color:#ffffff;}", showcarousel:true,carouselmargin:10,carouselbgtransparent:true,thumbwidth:48,thumbheight:48,thumbgap:8,thumbmargin:12,thumbunselectedimagebordercolor:"#fff",thumbimageborder:2,thumbimagebordercolor:"#fff",thumbshowplayonvideo:true,thumbshadow:true,thumbopacity:0.8};var mediapageSkinOptions={padding:0,skinfolder:"skins/mediapage/",bgcolor:"",bgimage:"",galleryshadow:false,slideshadow:false,showsocialmedia:false,headerpos:"top",showdescription:true,titleoverlay:true,titleautohide:true,titlecss:" {color:#ffffff; font-size:14px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; white-space:normal; text-align:left; padding:10px 0px 10px 10px; background:rgb(102, 102, 102) transparent; background: rgba(102, 102, 102, 0.6); filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr=#99666666, endColorstr=#99666666)'; -ms-filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr=#99666666, endColorstr=#99666666)'; }", titlecsslink:" a {color:#ffffff;}",descriptioncss:" {color:#ffffff; font-size:12px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; white-space:normal; text-align:left; padding:0px 0px 10px 10px; background:rgb(102, 102, 102) transparent; background: rgba(102, 102, 102, 0.6); filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr=#99666666, endColorstr=#99666666)'; -ms-filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr=#99666666, endColorstr=#99666666)'; }",descriptioncsslink:" a {color:#ffffff;}", showcarousel:true,carouselmargin:24,carouselmultirows:true,thumbrowgap:16,carouselbgtransparent:true,thumbwidth:120,thumbheight:60,thumbgap:10,thumbmargin:12,thumbunselectedimagebordercolor:"#fff",thumbimageborder:0,thumbimagebordercolor:"#fff",thumbshowplayonvideo:true,thumbshadow:false,thumbopacity:0.8,thumbjumptotop:true,thumbshowtitle:true,thumbtitlecss:"{text-align:center; color:#000; font-size:12px; font-family:Arial,Helvetica,sans-serif; overflow:hidden;}",thumbtitleheight:24};var gallerySkinOptions= {padding:12,skinfolder:"skins/gallery/",bgcolor:"",bgimage:"",galleryshadow:false,slideshadow:true,showsocialmedia:false,headerpos:"top",showdescription:true,titleoverlay:true,titleautohide:true,titlecss:" {color:#ffffff; font-size:14px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; white-space:normal; text-align:left; padding:10px 0px 10px 10px; background:rgb(102, 102, 102) transparent; background: rgba(102, 102, 102, 0.6); filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr=#99666666, endColorstr=#99666666)'; -ms-filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr=#99666666, endColorstr=#99666666)'; }", titlecsslink:" a {color:#ffffff;}",descriptioncss:" {color:#ffffff; font-size:12px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; white-space:normal; text-align:left; padding:0px 0px 10px 10px; background:rgb(102, 102, 102) transparent; background: rgba(102, 102, 102, 0.6); filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr=#99666666, endColorstr=#99666666)'; -ms-filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr=#99666666, endColorstr=#99666666)'; }",descriptioncsslink:" a {color:#ffffff;}", showcarousel:true,carouselmargin:10,carouselbgtransparent:true,thumbwidth:120,thumbheight:60,thumbgap:8,thumbmargin:12,thumbunselectedimagebordercolor:"#fff",thumbimageborder:2,thumbimagebordercolor:"#fff",thumbshowplayonvideo:true,thumbshadow:true,thumbopacity:0.8,thumbshowtitle:true,thumbtitlecss:"{text-align:center; color:#000; font-size:12px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; white-space:nowrap;}",thumbtitleheight:18};var galleryWithTextSkinOptions={padding:12,skinfolder:"skins/gallery/", bgcolor:"",bgimage:"",galleryshadow:false,slideshadow:true,showsocialmedia:false,headerpos:"bottom",showdescription:true,titleoverlay:false,titleheight:72,titleautohide:true,titlecss:"{color:#333;font-size:14px;font-family:Arial,Helvetica,sans-serif;overflow:hidden;text-align:center;padding:16px 8px 4px 8px;}",titlecsslink:"a{color:#333;}",descriptioncss:"{color:#333;font-size:12px;font-family:Arial,Helvetica,sans-serif;overflow:hidden;text-align:center;padding:4px 8px; }",descriptioncsslink:"a{color:#333;}", showcarousel:true,carouselmargin:10,carouselbgtransparent:true,thumbwidth:120,thumbheight:60,thumbgap:8,thumbmargin:12,thumbunselectedimagebordercolor:"#fff",thumbimageborder:2,thumbimagebordercolor:"#fff",thumbshowplayonvideo:true,thumbshadow:true,thumbopacity:0.8,thumbshowtitle:false,thumbtitlecss:"{text-align:center; color:#000; font-size:12px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; white-space:nowrap;}",thumbtitleheight:18};var darknessSkinOptions={skinfolder:"skins/darkness/", padding:12,bgcolor:"#444444",bgimage:"background.jpg",galleryshadow:false,slideshadow:false,headerpos:"bottom",showdescription:false,titleoverlay:false,titleautohide:false,titlecss:" {color:#ffffff; font-size:16px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; white-space:normal; text-align:left; padding:10px 0px;}",titlecsslink:" a {color:#ffffff;}",descriptioncss:" {color:#ffffff; font-size:12px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; white-space:normal; text-align:left; padding:0px 0px 10px 0px;}", descriptioncsslink:" a {color:#ffffff;}",showcarousel:true,carouselmargin:8,carouselbgtransparent:false,carouselbgcolorstart:"#494f54",carouselbgcolorend:"#292c31",carouseltopborder:"#666666",carouselbottomborder:"#111111",thumbwidth:64,thumbheight:48,thumbgap:4,thumbmargin:6,thumbunselectedimagebordercolor:"#ffffff",thumbimageborder:1,thumbimagebordercolor:"",thumbshowplayonvideo:true,thumbshadow:false,thumbopacity:0.8};var verticalSkinOptions={skinfolder:"skins/vertical/",padding:12,bgcolor:"#444444", bgimage:"background.jpg",galleryshadow:false,slideshadow:false,headerpos:"bottom",showdescription:false,titleoverlay:false,titleautohide:false,titlecss:" {color:#ffffff; font-size:16px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; white-space:normal; text-align:left; padding:10px 0px;}",titlecsslink:" a {color:#ffffff;}",descriptioncss:" {color:#ffffff; font-size:12px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; white-space:normal; text-align:left; padding:0px 0px 10px 0px;}", descriptioncsslink:" a {color:#ffffff;}",showcarousel:true,carouselmargin:8,carouselposition:"right",carouselbgtransparent:false,carouselbgcolorstart:"#494f54",carouselbgcolorend:"#292c31",carouseltopborder:"#666666",carouselbottomborder:"#111111",carouselhighlightbgcolorstart:"#999999",carouselhighlightbgcolorend:"#666666",carouselhighlighttopborder:"#cccccc",carouselhighlightbottomborder:"#444444",carouselhighlightbgimage:"",thumbwidth:148,thumbheight:48,thumbgap:2,thumbmargin:6,thumbunselectedimagebordercolor:"", thumbimageborder:1,thumbimagebordercolor:"#cccccc",thumbshowplayonvideo:true,thumbshadow:false,thumbopacity:0.8,thumbshowimage:true,thumbshowtitle:true,thumbtitlecss:"{text-align:center; color:#ffffff; font-size:12px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; white-space:nowrap;}"};var showcaseSkinOptions={skinfolder:"skins/showcase/",padding:12,bgcolor:"#444444",bgimage:"background.jpg",galleryshadow:false,slideshadow:false,showsocialmedia:false,headerpos:"bottom",showdescription:false, titleoverlay:false,titleautohide:false,titlecss:" {color:#ffffff; font-size:16px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; white-space:normal; text-align:left; padding:10px 0px;}",titlecsslink:" a {color:#ffffff;}",descriptioncss:" {color:#ffffff; font-size:12px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; white-space:normal; text-align:left; padding:0px 0px 10px 0px;}",descriptioncsslink:" a {color:#ffffff;}",showcarousel:true,carouselmargin:8,carouselposition:"bottom", carouselheight:210,carouselbgtransparent:false,carouselbgcolorstart:"#494f54",carouselbgcolorend:"#292c31",carouseltopborder:"#666666",carouselbottomborder:"#111111",carouselhighlightbgcolorstart:"#999999",carouselhighlightbgcolorend:"#666666",carouselhighlighttopborder:"#cccccc",carouselhighlightbottomborder:"#444444",carouselhighlightbgimage:"",thumbwidth:148,thumbheight:60,thumbgap:2,thumbmargin:6,thumbunselectedimagebordercolor:"",thumbimageborder:1,thumbimagebordercolor:"#cccccc",thumbshowplayonvideo:true, thumbshadow:false,thumbopacity:0.8,thumbshowimage:true,thumbshowtitle:true,thumbtitlecss:"{text-align:left; color:#ffffff; font-size:12px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; padding: 6px 0;}",thumbshowdescription:true,thumbdescriptioncss:"{font-size:10px;}"};var sysOptions=commonOptions;if(this.options.skin=="vertical")sysOptions=$.extend(sysOptions,verticalSkinOptions);else if(this.options.skin=="showcase")sysOptions=$.extend(sysOptions,showcaseSkinOptions);else if(this.options.skin== "light")sysOptions=$.extend(sysOptions,lightSkinOptions);else if(this.options.skin=="gallery")sysOptions=$.extend(sysOptions,gallerySkinOptions);else if(this.options.skin=="gallerywithtext")sysOptions=$.extend(sysOptions,galleryWithTextSkinOptions);else if(this.options.skin=="horizontal")sysOptions=$.extend(sysOptions,horizontalSkinOptions);else if(this.options.skin=="darkness")sysOptions=$.extend(sysOptions,darknessSkinOptions);else if(this.options.skin=="mediapage")sysOptions=$.extend(sysOptions, mediapageSkinOptions);else sysOptions=$.extend(sysOptions,horizontalSkinOptions);this.options=$.extend(sysOptions,this.options);this.options.htmlfolder=window.location.href.substr(0,window.location.href.lastIndexOf("/")+1);if(!this.options.jsfolder||!this.options.jsfolder.length)this.options.jsfolder=jsFolder;if(this.options.skinfolder.charAt(0)!="/"&&this.options.skinfolder.substring(0,5)!="http:"&&this.options.skinfolder.substring(0,6)!="https:")this.options.skinfolder=this.options.jsfolder+this.options.skinfolder; var i;var l;var mark="";var bytes=this.options.fm.split(",");for(i=0;i https://demolicionescordoba.es/wp-content/plugins/wp-posts-carousel/owl.carousel/owl.carousel.js /** * Owl carousel * @version 2.0.0 * @author Bartosz Wojciechowski * @license The MIT License (MIT) * @todo Lazy Load Icon * @todo prevent animationend bubling * @todo itemsScaleUp * @todo Test Zepto * @todo stagePadding calculate wrong active classes */ ;(function($, window, document, undefined) { var drag, state, e; /** * Template for status information about drag and touch events. * @private */ drag = { start: 0, startX: 0, startY: 0, current: 0, currentX: 0, currentY: 0, offsetX: 0, offsetY: 0, distance: null, startTime: 0, endTime: 0, updatedX: 0, targetEl: null }; /** * Template for some status informations. * @private */ state = { isTouch: false, isScrolling: false, isSwiping: false, direction: false, inMotion: false }; /** * Event functions references. * @private */ e = { _onDragStart: null, _onDragMove: null, _onDragEnd: null, _transitionEnd: null, _resizer: null, _responsiveCall: null, _goToLoop: null, _checkVisibile: null }; /** * Creates a carousel. * @class The Owl Carousel. * @public * @param {HTMLElement|jQuery} element - The element to create the carousel for. * @param {Object} [options] - The options */ function Owl(element, options) { /** * Current settings for the carousel. * @public */ this.settings = null; /** * Current options set by the caller including defaults. * @public */ this.options = $.extend({}, Owl.Defaults, options); /** * Plugin element. * @public */ this.$element = $(element); /** * Caches informations about drag and touch events. */ this.drag = $.extend({}, drag); /** * Caches some status informations. * @protected */ this.state = $.extend({}, state); /** * @protected * @todo Must be documented */ this.e = $.extend({}, e); /** * References to the running plugins of this carousel. * @protected */ this._plugins = {}; /** * Currently suppressed events to prevent them from beeing retriggered. * @protected */ this._supress = {}; /** * Absolute current position. * @protected */ this._current = null; /** * Animation speed in milliseconds. * @protected */ this._speed = null; /** * Coordinates of all items in pixel. * @todo The name of this member is missleading. * @protected */ this._coordinates = []; /** * Current breakpoint. * @todo Real media queries would be nice. * @protected */ this._breakpoint = null; /** * Current width of the plugin element. */ this._width = null; /** * All real items. * @protected */ this._items = []; /** * All cloned items. * @protected */ this._clones = []; /** * Merge values of all items. * @todo Maybe this could be part of a plugin. * @protected */ this._mergers = []; /** * Invalidated parts within the update process. * @protected */ this._invalidated = {}; /** * Ordered list of workers for the update process. * @protected */ this._pipe = []; $.each(Owl.Plugins, $.proxy(function(key, plugin) { this._plugins[key[0].toLowerCase() + key.slice(1)] = new plugin(this); }, this)); $.each(Owl.Pipe, $.proxy(function(priority, worker) { this._pipe.push({ 'filter': worker.filter, 'run': $.proxy(worker.run, this) }); }, this)); this.setup(); this.initialize(); } /** * Default options for the carousel. * @public */ Owl.Defaults = { items: 3, loop: false, center: false, mouseDrag: true, touchDrag: true, pullDrag: true, freeDrag: false, margin: 0, stagePadding: 0, merge: false, mergeFit: true, autoWidth: false, startPosition: 0, rtl: false, smartSpeed: 250, fluidSpeed: false, dragEndSpeed: false, responsive: {}, responsiveRefreshRate: 200, responsiveBaseElement: window, responsiveClass: false, fallbackEasing: 'swing', info: false, nestedItemSelector: false, itemElement: 'div', stageElement: 'div', // Classes and Names themeClass: 'owl-theme', baseClass: 'owl-carousel', itemClass: 'owl-item', centerClass: 'center', activeClass: 'active' }; /** * Enumeration for width. * @public * @readonly * @enum {String} */ Owl.Width = { Default: 'default', Inner: 'inner', Outer: 'outer' }; /** * Contains all registered plugins. * @public */ Owl.Plugins = {}; /** * Update pipe. */ Owl.Pipe = [ { filter: [ 'width', 'items', 'settings' ], run: function(cache) { cache.current = this._items && this._items[this.relative(this._current)]; } }, { filter: [ 'items', 'settings' ], run: function() { var cached = this._clones, clones = this.$stage.children('.cloned'); if (clones.length !== cached.length || (!this.settings.loop && cached.length > 0)) { this.$stage.children('.cloned').remove(); this._clones = []; } } }, { filter: [ 'items', 'settings' ], run: function() { var i, n, clones = this._clones, items = this._items, delta = this.settings.loop ? clones.length - Math.max(this.settings.items * 2, 4) : 0; for (i = 0, n = Math.abs(delta / 2); i < n; i++) { if (delta > 0) { this.$stage.children().eq(items.length + clones.length - 1).remove(); clones.pop(); this.$stage.children().eq(0).remove(); clones.pop(); } else { clones.push(clones.length / 2); this.$stage.append(items[clones[clones.length - 1]].clone().addClass('cloned')); clones.push(items.length - 1 - (clones.length - 1) / 2); this.$stage.prepend(items[clones[clones.length - 1]].clone().addClass('cloned')); } } } }, { filter: [ 'width', 'items', 'settings' ], run: function() { var rtl = (this.settings.rtl ? 1 : -1), width = (this.width() / this.settings.items).toFixed(3), coordinate = 0, merge, i, n; this._coordinates = []; for (i = 0, n = this._clones.length + this._items.length; i < n; i++) { merge = this._mergers[this.relative(i)]; merge = (this.settings.mergeFit && Math.min(merge, this.settings.items)) || merge; coordinate += (this.settings.autoWidth ? this._items[this.relative(i)].width() + this.settings.margin : width * merge) * rtl; this._coordinates.push(coordinate); } } }, { filter: [ 'width', 'items', 'settings' ], run: function() { var i, n, width = (this.width() / this.settings.items).toFixed(3), css = { 'width': Math.abs(this._coordinates[this._coordinates.length - 1]) + this.settings.stagePadding * 2, 'padding-left': this.settings.stagePadding || '', 'padding-right': this.settings.stagePadding || '' }; this.$stage.css(css); css = { 'width': this.settings.autoWidth ? 'auto' : width - this.settings.margin }; css[this.settings.rtl ? 'margin-left' : 'margin-right'] = this.settings.margin; if (!this.settings.autoWidth && $.grep(this._mergers, function(v) { return v > 1 }).length > 0) { for (i = 0, n = this._coordinates.length; i < n; i++) { css.width = Math.abs(this._coordinates[i]) - Math.abs(this._coordinates[i - 1] || 0) - this.settings.margin; this.$stage.children().eq(i).css(css); } } else { this.$stage.children().css(css); } } }, { filter: [ 'width', 'items', 'settings' ], run: function(cache) { cache.current && this.reset(this.$stage.children().index(cache.current)); } }, { filter: [ 'position' ], run: function() { this.animate(this.coordinates(this._current)); } }, { filter: [ 'width', 'position', 'items', 'settings' ], run: function() { var rtl = this.settings.rtl ? 1 : -1, padding = this.settings.stagePadding * 2, begin = this.coordinates(this.current()) + padding, end = begin + this.width() * rtl, inner, outer, matches = [], i, n; for (i = 0, n = this._coordinates.length; i < n; i++) { inner = this._coordinates[i - 1] || 0; outer = Math.abs(this._coordinates[i]) + padding * rtl; if ((this.op(inner, '<=', begin) && (this.op(inner, '>', end))) || (this.op(outer, '<', begin) && this.op(outer, '>', end))) { matches.push(i); } } this.$stage.children('.' + this.settings.activeClass).removeClass(this.settings.activeClass); this.$stage.children(':eq(' + matches.join('), :eq(') + ')').addClass(this.settings.activeClass); if (this.settings.center) { this.$stage.children('.' + this.settings.centerClass).removeClass(this.settings.centerClass); this.$stage.children().eq(this.current()).addClass(this.settings.centerClass); } } } ]; /** * Initializes the carousel. * @protected */ Owl.prototype.initialize = function() { this.trigger('initialize'); this.$element .addClass(this.settings.baseClass) .addClass(this.settings.themeClass) .toggleClass('owl-rtl', this.settings.rtl); // check support this.browserSupport(); if (this.settings.autoWidth && this.state.imagesLoaded !== true) { var imgs, nestedSelector, width; imgs = this.$element.find('img'); nestedSelector = this.settings.nestedItemSelector ? '.' + this.settings.nestedItemSelector : undefined; width = this.$element.children(nestedSelector).width(); if (imgs.length && width <= 0) { this.preloadAutoWidthImages(imgs); return false; } } this.$element.addClass('owl-loading'); // create stage this.$stage = $('<' + this.settings.stageElement + ' class="owl-stage"/>') .wrap('
'); // append stage this.$element.append(this.$stage.parent()); // append content this.replace(this.$element.children().not(this.$stage.parent())); // set view width this._width = this.$element.width(); // update view this.refresh(); this.$element.removeClass('owl-loading').addClass('owl-loaded'); // attach generic events this.eventsCall(); // attach generic events this.internalEvents(); // attach custom control events this.addTriggerableEvents(); this.trigger('initialized'); }; /** * Setups the current settings. * @todo Remove responsive classes. Why should adaptive designs be brought into IE8? * @todo Support for media queries by using `matchMedia` would be nice. * @public */ Owl.prototype.setup = function() { var viewport = this.viewport(), overwrites = this.options.responsive, match = -1, settings = null; if (!overwrites) { settings = $.extend({}, this.options); } else { $.each(overwrites, function(breakpoint) { if (breakpoint <= viewport && breakpoint > match) { match = Number(breakpoint); } }); settings = $.extend({}, this.options, overwrites[match]); delete settings.responsive; // responsive class if (settings.responsiveClass) { this.$element.attr('class', function(i, c) { return c.replace(/\b owl-responsive-\S+/g, ''); }).addClass('owl-responsive-' + match); } } if (this.settings === null || this._breakpoint !== match) { this.trigger('change', { property: { name: 'settings', value: settings } }); this._breakpoint = match; this.settings = settings; this.invalidate('settings'); this.trigger('changed', { property: { name: 'settings', value: this.settings } }); } }; /** * Updates option logic if necessery. * @protected */ Owl.prototype.optionsLogic = function() { // Toggle Center class this.$element.toggleClass('owl-center', this.settings.center); // if items number is less than in body if (this.settings.loop && this._items.length < this.settings.items) { this.settings.loop = false; } if (this.settings.autoWidth) { this.settings.stagePadding = false; this.settings.merge = false; } }; /** * Prepares an item before add. * @todo Rename event parameter `content` to `item`. * @protected * @returns {jQuery|HTMLElement} - The item container. */ Owl.prototype.prepare = function(item) { var event = this.trigger('prepare', { content: item }); if (!event.data) { event.data = $('<' + this.settings.itemElement + '/>') .addClass(this.settings.itemClass).append(item) } this.trigger('prepared', { content: event.data }); return event.data; }; /** * Updates the view. * @public */ Owl.prototype.update = function() { var i = 0, n = this._pipe.length, filter = $.proxy(function(p) { return this[p] }, this._invalidated), cache = {}; while (i < n) { if (this._invalidated.all || $.grep(this._pipe[i].filter, filter).length > 0) { this._pipe[i].run(cache); } i++; } this._invalidated = {}; }; /** * Gets the width of the view. * @public * @param {Owl.Width} [dimension=Owl.Width.Default] - The dimension to return. * @returns {Number} - The width of the view in pixel. */ Owl.prototype.width = function(dimension) { dimension = dimension || Owl.Width.Default; switch (dimension) { case Owl.Width.Inner: case Owl.Width.Outer: return this._width; default: return this._width - this.settings.stagePadding * 2 + this.settings.margin; } }; /** * Refreshes the carousel primarily for adaptive purposes. * @public */ Owl.prototype.refresh = function() { if (this._items.length === 0) { return false; } var start = new Date().getTime(); this.trigger('refresh'); this.setup(); this.optionsLogic(); // hide and show methods helps here to set a proper widths, // this prevents scrollbar to be calculated in stage width this.$stage.addClass('owl-refresh'); this.update(); this.$stage.removeClass('owl-refresh'); this.state.orientation = window.orientation; this.watchVisibility(); this.trigger('refreshed'); }; /** * Save internal event references and add event based functions. * @protected */ Owl.prototype.eventsCall = function() { // Save events references this.e._onDragStart = $.proxy(function(e) { this.onDragStart(e); }, this); this.e._onDragMove = $.proxy(function(e) { this.onDragMove(e); }, this); this.e._onDragEnd = $.proxy(function(e) { this.onDragEnd(e); }, this); this.e._onResize = $.proxy(function(e) { this.onResize(e); }, this); this.e._transitionEnd = $.proxy(function(e) { this.transitionEnd(e); }, this); this.e._preventClick = $.proxy(function(e) { this.preventClick(e); }, this); }; /** * Checks window `resize` event. * @protected */ Owl.prototype.onThrottledResize = function() { window.clearTimeout(this.resizeTimer); this.resizeTimer = window.setTimeout(this.e._onResize, this.settings.responsiveRefreshRate); }; /** * Checks window `resize` event. * @protected */ Owl.prototype.onResize = function() { if (!this._items.length) { return false; } if (this._width === this.$element.width()) { return false; } if (this.trigger('resize').isDefaultPrevented()) { return false; } this._width = this.$element.width(); this.invalidate('width'); this.refresh(); this.trigger('resized'); }; /** * Checks for touch/mouse drag event type and add run event handlers. * @protected */ Owl.prototype.eventsRouter = function(event) { var type = event.type; if (type === "mousedown" || type === "touchstart") { this.onDragStart(event); } else if (type === "mousemove" || type === "touchmove") { this.onDragMove(event); } else if (type === "mouseup" || type === "touchend") { this.onDragEnd(event); } else if (type === "touchcancel") { this.onDragEnd(event); } }; /** * Checks for touch/mouse drag options and add necessery event handlers. * @protected */ Owl.prototype.internalEvents = function() { var isTouch = isTouchSupport(), isTouchIE = isTouchSupportIE(); if (this.settings.mouseDrag){ this.$stage.on('mousedown', $.proxy(function(event) { this.eventsRouter(event) }, this)); this.$stage.on('dragstart', function() { return false }); this.$stage.get(0).onselectstart = function() { return false }; } else { this.$element.addClass('owl-text-select-on'); } if (this.settings.touchDrag && !isTouchIE){ this.$stage.on('touchstart touchcancel', $.proxy(function(event) { this.eventsRouter(event) }, this)); } // catch transitionEnd event if (this.transitionEndVendor) { this.on(this.$stage.get(0), this.transitionEndVendor, this.e._transitionEnd, false); } // responsive if (this.settings.responsive !== false) { this.on(window, 'resize', $.proxy(this.onThrottledResize, this)); } }; /** * Handles touchstart/mousedown event. * @protected * @param {Event} event - The event arguments. */ Owl.prototype.onDragStart = function(event) { var ev, isTouchEvent, pageX, pageY, animatedPos; ev = event.originalEvent || event || window.event; // prevent right click if (ev.which === 3 || this.state.isTouch) { return false; } if (ev.type === 'mousedown') { this.$stage.addClass('owl-grab'); } this.trigger('drag'); this.drag.startTime = new Date().getTime(); this.speed(0); this.state.isTouch = true; this.state.isScrolling = false; this.state.isSwiping = false; this.drag.distance = 0; pageX = getTouches(ev).x; pageY = getTouches(ev).y; // get stage position left this.drag.offsetX = this.$stage.position().left; this.drag.offsetY = this.$stage.position().top; if (this.settings.rtl) { this.drag.offsetX = this.$stage.position().left + this.$stage.width() - this.width() + this.settings.margin; } // catch position // ie to fix if (this.state.inMotion && this.support3d) { animatedPos = this.getTransformProperty(); this.drag.offsetX = animatedPos; this.animate(animatedPos); this.state.inMotion = true; } else if (this.state.inMotion && !this.support3d) { this.state.inMotion = false; return false; } this.drag.startX = pageX - this.drag.offsetX; this.drag.startY = pageY - this.drag.offsetY; this.drag.start = pageX - this.drag.startX; this.drag.targetEl = ev.target || ev.srcElement; this.drag.updatedX = this.drag.start; // to do/check // prevent links and images dragging; if (this.drag.targetEl.tagName === "IMG" || this.drag.targetEl.tagName === "A") { this.drag.targetEl.draggable = false; } $(document).on('mousemove.owl.dragEvents mouseup.owl.dragEvents touchmove.owl.dragEvents touchend.owl.dragEvents', $.proxy(function(event) {this.eventsRouter(event)},this)); }; /** * Handles the touchmove/mousemove events. * @todo Simplify * @protected * @param {Event} event - The event arguments. */ Owl.prototype.onDragMove = function(event) { var ev, isTouchEvent, pageX, pageY, minValue, maxValue, pull; if (!this.state.isTouch) { return; } if (this.state.isScrolling) { return; } ev = event.originalEvent || event || window.event; pageX = getTouches(ev).x; pageY = getTouches(ev).y; // Drag Direction this.drag.currentX = pageX - this.drag.startX; this.drag.currentY = pageY - this.drag.startY; this.drag.distance = this.drag.currentX - this.drag.offsetX; // Check move direction if (this.drag.distance < 0) { this.state.direction = this.settings.rtl ? 'right' : 'left'; } else if (this.drag.distance > 0) { this.state.direction = this.settings.rtl ? 'left' : 'right'; } // Loop if (this.settings.loop) { if (this.op(this.drag.currentX, '>', this.coordinates(this.minimum())) && this.state.direction === 'right') { this.drag.currentX -= (this.settings.center && this.coordinates(0)) - this.coordinates(this._items.length); } else if (this.op(this.drag.currentX, '<', this.coordinates(this.maximum())) && this.state.direction === 'left') { this.drag.currentX += (this.settings.center && this.coordinates(0)) - this.coordinates(this._items.length); } } else { // pull minValue = this.settings.rtl ? this.coordinates(this.maximum()) : this.coordinates(this.minimum()); maxValue = this.settings.rtl ? this.coordinates(this.minimum()) : this.coordinates(this.maximum()); pull = this.settings.pullDrag ? this.drag.distance / 5 : 0; this.drag.currentX = Math.max(Math.min(this.drag.currentX, minValue + pull), maxValue + pull); } // Lock browser if swiping horizontal if ((this.drag.distance > 8 || this.drag.distance < -8)) { if (ev.preventDefault !== undefined) { ev.preventDefault(); } else { ev.returnValue = false; } this.state.isSwiping = true; } this.drag.updatedX = this.drag.currentX; // Lock Owl if scrolling if ((this.drag.currentY > 16 || this.drag.currentY < -16) && this.state.isSwiping === false) { this.state.isScrolling = true; this.drag.updatedX = this.drag.start; } this.animate(this.drag.updatedX); }; /** * Handles the touchend/mouseup events. * @protected */ Owl.prototype.onDragEnd = function(event) { var compareTimes, distanceAbs, closest; if (!this.state.isTouch) { return; } if (event.type === 'mouseup') { this.$stage.removeClass('owl-grab'); } this.trigger('dragged'); // prevent links and images dragging; this.drag.targetEl.removeAttribute("draggable"); // remove drag event listeners this.state.isTouch = false; this.state.isScrolling = false; this.state.isSwiping = false; // to check if (this.drag.distance === 0 && this.state.inMotion !== true) { this.state.inMotion = false; return false; } // prevent clicks while scrolling this.drag.endTime = new Date().getTime(); compareTimes = this.drag.endTime - this.drag.startTime; distanceAbs = Math.abs(this.drag.distance); // to test if (distanceAbs > 3 || compareTimes > 300) { this.removeClick(this.drag.targetEl); } closest = this.closest(this.drag.updatedX); this.speed(this.settings.dragEndSpeed || this.settings.smartSpeed); this.current(closest); this.invalidate('position'); this.update(); // if pullDrag is off then fire transitionEnd event manually when stick // to border if (!this.settings.pullDrag && this.drag.updatedX === this.coordinates(closest)) { this.transitionEnd(); } this.drag.distance = 0; $(document).off('.owl.dragEvents'); }; /** * Attaches `preventClick` to disable link while swipping. * @protected * @param {HTMLElement} [target] - The target of the `click` event. */ Owl.prototype.removeClick = function(target) { this.drag.targetEl = target; $(target).on('click.preventClick', this.e._preventClick); // to make sure click is removed: window.setTimeout(function() { $(target).off('click.preventClick'); }, 300); }; /** * Suppresses click event. * @protected * @param {Event} ev - The event arguments. */ Owl.prototype.preventClick = function(ev) { if (ev.preventDefault) { ev.preventDefault(); } else { ev.returnValue = false; } if (ev.stopPropagation) { ev.stopPropagation(); } $(ev.target).off('click.preventClick'); }; /** * Catches stage position while animate (only CSS3). * @protected * @returns */ Owl.prototype.getTransformProperty = function() { var transform, matrix3d; transform = window.getComputedStyle(this.$stage.get(0), null).getPropertyValue(this.vendorName + 'transform'); // var transform = this.$stage.css(this.vendorName + 'transform') transform = transform.replace(/matrix(3d)?\(|\)/g, '').split(','); matrix3d = transform.length === 16; return matrix3d !== true ? transform[4] : transform[12]; }; /** * Gets absolute position of the closest item for a coordinate. * @todo Setting `freeDrag` makes `closest` not reusable. See #165. * @protected * @param {Number} coordinate - The coordinate in pixel. * @return {Number} - The absolute position of the closest item. */ Owl.prototype.closest = function(coordinate) { var position = -1, pull = 30, width = this.width(), coordinates = this.coordinates(); if (!this.settings.freeDrag) { // check closest item $.each(coordinates, $.proxy(function(index, value) { if (coordinate > value - pull && coordinate < value + pull) { position = index; } else if (this.op(coordinate, '<', value) && this.op(coordinate, '>', coordinates[index + 1] || value - width)) { position = this.state.direction === 'left' ? index + 1 : index; } return position === -1; }, this)); } if (!this.settings.loop) { // non loop boundries if (this.op(coordinate, '>', coordinates[this.minimum()])) { position = coordinate = this.minimum(); } else if (this.op(coordinate, '<', coordinates[this.maximum()])) { position = coordinate = this.maximum(); } } return position; }; /** * Animates the stage. * @public * @param {Number} coordinate - The coordinate in pixels. */ Owl.prototype.animate = function(coordinate) { this.trigger('translate'); this.state.inMotion = this.speed() > 0; /* if (this.support3d) { this.$stage.css({ transform: 'translate3d(' + coordinate + 'px' + ',0px, 0px)', transition: (this.speed() / 1000) + 's' }); } else if (this.state.isTouch) { this.$stage.css({ left: coordinate + 'px' }); } else {*/ this.$stage.animate({ left: coordinate + 'px' }, this.speed(), this.settings.fallbackEasing, $.proxy(function() { //if (this.state.inMotion) { this.transitionEnd(); //} }, this)); /* }*/ }; /** * Sets the absolute position of the current item. * @public * @param {Number} [position] - The new absolute position or nothing to leave it unchanged. * @returns {Number} - The absolute position of the current item. */ Owl.prototype.current = function(position) { if (position === undefined) { return this._current; } if (this._items.length === 0) { return undefined; } position = this.normalize(position); if (this._current !== position) { var event = this.trigger('change', { property: { name: 'position', value: position } }); if (event.data !== undefined) { position = this.normalize(event.data); } this._current = position; this.invalidate('position'); this.trigger('changed', { property: { name: 'position', value: this._current } }); } return this._current; }; /** * Invalidates the given part of the update routine. * @param {String} part - The part to invalidate. */ Owl.prototype.invalidate = function(part) { this._invalidated[part] = true; } /** * Resets the absolute position of the current item. * @public * @param {Number} position - The absolute position of the new item. */ Owl.prototype.reset = function(position) { position = this.normalize(position); if (position === undefined) { return; } this._speed = 0; this._current = position; this.suppress([ 'translate', 'translated' ]); this.animate(this.coordinates(position)); this.release([ 'translate', 'translated' ]); }; /** * Normalizes an absolute or a relative position for an item. * @public * @param {Number} position - The absolute or relative position to normalize. * @param {Boolean} [relative=false] - Whether the given position is relative or not. * @returns {Number} - The normalized position. */ Owl.prototype.normalize = function(position, relative) { var n = (relative ? this._items.length : this._items.length + this._clones.length); if (!$.isNumeric(position) || n < 1) { return undefined; } if (this._clones.length) { position = ((position % n) + n) % n; } else { position = Math.max(this.minimum(relative), Math.min(this.maximum(relative), position)); } return position; }; /** * Converts an absolute position for an item into a relative position. * @public * @param {Number} position - The absolute position to convert. * @returns {Number} - The converted position. */ Owl.prototype.relative = function(position) { position = this.normalize(position); position = position - this._clones.length / 2; return this.normalize(position, true); }; /** * Gets the maximum position for an item. * @public * @param {Boolean} [relative=false] - Whether to return an absolute position or a relative position. * @returns {Number} */ Owl.prototype.maximum = function(relative) { var maximum, width, i = 0, coordinate, settings = this.settings; if (relative) { return this._items.length - 1; } if (!settings.loop && settings.center) { maximum = this._items.length - 1; } else if (!settings.loop && !settings.center) { maximum = this._items.length - settings.items; } else if (settings.loop || settings.center) { maximum = this._items.length + settings.items; } else if (settings.autoWidth || settings.merge) { revert = settings.rtl ? 1 : -1; width = this.$stage.width() - this.$element.width(); while (coordinate = this.coordinates(i)) { if (coordinate * revert >= width) { break; } maximum = ++i; } } else { throw 'Can not detect maximum absolute position.' } return maximum; }; /** * Gets the minimum position for an item. * @public * @param {Boolean} [relative=false] - Whether to return an absolute position or a relative position. * @returns {Number} */ Owl.prototype.minimum = function(relative) { if (relative) { return 0; } return this._clones.length / 2; }; /** * Gets an item at the specified relative position. * @public * @param {Number} [position] - The relative position of the item. * @return {jQuery|Array.} - The item at the given position or all items if no position was given. */ Owl.prototype.items = function(position) { if (position === undefined) { return this._items.slice(); } position = this.normalize(position, true); return this._items[position]; }; /** * Gets an item at the specified relative position. * @public * @param {Number} [position] - The relative position of the item. * @return {jQuery|Array.} - The item at the given position or all items if no position was given. */ Owl.prototype.mergers = function(position) { if (position === undefined) { return this._mergers.slice(); } position = this.normalize(position, true); return this._mergers[position]; }; /** * Gets the absolute positions of clones for an item. * @public * @param {Number} [position] - The relative position of the item. * @returns {Array.} - The absolute positions of clones for the item or all if no position was given. */ Owl.prototype.clones = function(position) { var odd = this._clones.length / 2, even = odd + this._items.length, map = function(index) { return index % 2 === 0 ? even + index / 2 : odd - (index + 1) / 2 }; if (position === undefined) { return $.map(this._clones, function(v, i) { return map(i) }); } return $.map(this._clones, function(v, i) { return v === position ? map(i) : null }); }; /** * Sets the current animation speed. * @public * @param {Number} [speed] - The animation speed in milliseconds or nothing to leave it unchanged. * @returns {Number} - The current animation speed in milliseconds. */ Owl.prototype.speed = function(speed) { if (speed !== undefined) { this._speed = speed; } return this._speed; }; /** * Gets the coordinate of an item. * @todo The name of this method is missleanding. * @public * @param {Number} position - The absolute position of the item within `minimum()` and `maximum()`. * @returns {Number|Array.} - The coordinate of the item in pixel or all coordinates. */ Owl.prototype.coordinates = function(position) { var coordinate = null; if (position === undefined) { return $.map(this._coordinates, $.proxy(function(coordinate, index) { return this.coordinates(index); }, this)); } if (this.settings.center) { coordinate = this._coordinates[position]; coordinate += (this.width() - coordinate + (this._coordinates[position - 1] || 0)) / 2 * (this.settings.rtl ? -1 : 1); } else { coordinate = this._coordinates[position - 1] || 0; } return coordinate; }; /** * Calculates the speed for a translation. * @protected * @param {Number} from - The absolute position of the start item. * @param {Number} to - The absolute position of the target item. * @param {Number} [factor=undefined] - The time factor in milliseconds. * @returns {Number} - The time in milliseconds for the translation. */ Owl.prototype.duration = function(from, to, factor) { return Math.min(Math.max(Math.abs(to - from), 1), 6) * Math.abs((factor || this.settings.smartSpeed)); }; /** * Slides to the specified item. * @public * @param {Number} position - The position of the item. * @param {Number} [speed] - The time in milliseconds for the transition. */ Owl.prototype.to = function(position, speed) { if (this.settings.loop) { var distance = position - this.relative(this.current()), revert = this.current(), before = this.current(), after = this.current() + distance, direction = before - after < 0 ? true : false, items = this._clones.length + this._items.length; if (after < this.settings.items && direction === false) { revert = before + this._items.length; this.reset(revert); } else if (after >= items - this.settings.items && direction === true) { revert = before - this._items.length; this.reset(revert); } window.clearTimeout(this.e._goToLoop); this.e._goToLoop = window.setTimeout($.proxy(function() { this.speed(this.duration(this.current(), revert + distance, speed)); this.current(revert + distance); this.update(); }, this), 30); } else { this.speed(this.duration(this.current(), position, speed)); this.current(position); this.update(); } }; /** * Slides to the next item. * @public * @param {Number} [speed] - The time in milliseconds for the transition. */ Owl.prototype.next = function(speed) { speed = speed || false; this.to(this.relative(this.current()) + 1, speed); }; /** * Slides to the previous item. * @public * @param {Number} [speed] - The time in milliseconds for the transition. */ Owl.prototype.prev = function(speed) { speed = speed || false; this.to(this.relative(this.current()) - 1, speed); }; /** * Handles the end of an animation. * @protected * @param {Event} event - The event arguments. */ Owl.prototype.transitionEnd = function(event) { // if css2 animation then event object is undefined if (event !== undefined) { event.stopPropagation(); // Catch only owl-stage transitionEnd event if ((event.target || event.srcElement || event.originalTarget) !== this.$stage.get(0)) { return false; } } this.state.inMotion = false; this.trigger('translated'); }; /** * Gets viewport width. * @protected * @return {Number} - The width in pixel. */ Owl.prototype.viewport = function() { var width; if (this.options.responsiveBaseElement !== window) { width = $(this.options.responsiveBaseElement).width(); } else if (window.innerWidth) { width = window.innerWidth; } else if (document.documentElement && document.documentElement.clientWidth) { width = document.documentElement.clientWidth; } else { throw 'Can not detect viewport width.'; } return width; }; /** * Replaces the current content. * @public * @param {HTMLElement|jQuery|String} content - The new content. */ Owl.prototype.replace = function(content) { this.$stage.empty(); this._items = []; if (content) { content = (content instanceof jQuery) ? content : $(content); } if (this.settings.nestedItemSelector) { content = content.find('.' + this.settings.nestedItemSelector); } content.filter(function() { return this.nodeType === 1; }).each($.proxy(function(index, item) { item = this.prepare(item); this.$stage.append(item); this._items.push(item); this._mergers.push(item.find('[data-merge]').andSelf('[data-merge]').attr('data-merge') * 1 || 1); }, this)); this.reset($.isNumeric(this.settings.startPosition) ? this.settings.startPosition : 0); this.invalidate('items'); }; /** * Adds an item. * @todo Use `item` instead of `content` for the event arguments. * @public * @param {HTMLElement|jQuery|String} content - The item content to add. * @param {Number} [position] - The relative position at which to insert the item otherwise the item will be added to the end. */ Owl.prototype.add = function(content, position) { position = position === undefined ? this._items.length : this.normalize(position, true); this.trigger('add', { content: content, position: position }); if (this._items.length === 0 || position === this._items.length) { this.$stage.append(content); this._items.push(content); this._mergers.push(content.find('[data-merge]').andSelf('[data-merge]').attr('data-merge') * 1 || 1); } else { this._items[position].before(content); this._items.splice(position, 0, content); this._mergers.splice(position, 0, content.find('[data-merge]').andSelf('[data-merge]').attr('data-merge') * 1 || 1); } this.invalidate('items'); this.trigger('added', { content: content, position: position }); }; /** * Removes an item by its position. * @todo Use `item` instead of `content` for the event arguments. * @public * @param {Number} position - The relative position of the item to remove. */ Owl.prototype.remove = function(position) { position = this.normalize(position, true); if (position === undefined) { return; } this.trigger('remove', { content: this._items[position], position: position }); this._items[position].remove(); this._items.splice(position, 1); this._mergers.splice(position, 1); this.invalidate('items'); this.trigger('removed', { content: null, position: position }); }; /** * Adds triggerable events. * @protected */ Owl.prototype.addTriggerableEvents = function() { var handler = $.proxy(function(callback, event) { return $.proxy(function(e) { if (e.relatedTarget !== this) { this.suppress([ event ]); callback.apply(this, [].slice.call(arguments, 1)); this.release([ event ]); } }, this); }, this); $.each({ 'next': this.next, 'prev': this.prev, 'to': this.to, 'destroy': this.destroy, 'refresh': this.refresh, 'replace': this.replace, 'add': this.add, 'remove': this.remove }, $.proxy(function(event, callback) { this.$element.on(event + '.owl.carousel', handler(callback, event + '.owl.carousel')); }, this)); }; /** * Watches the visibility of the carousel element. * @protected */ Owl.prototype.watchVisibility = function() { // test on zepto if (!isElVisible(this.$element.get(0))) { this.$element.addClass('owl-hidden'); window.clearInterval(this.e._checkVisibile); this.e._checkVisibile = window.setInterval($.proxy(checkVisible, this), 500); } function isElVisible(el) { return el.offsetWidth > 0 && el.offsetHeight > 0; } function checkVisible() { if (isElVisible(this.$element.get(0))) { this.$element.removeClass('owl-hidden'); this.refresh(); window.clearInterval(this.e._checkVisibile); } } }; /** * Preloads images with auto width. * @protected * @todo Still to test */ Owl.prototype.preloadAutoWidthImages = function(imgs) { var loaded, that, $el, img; loaded = 0; that = this; imgs.each(function(i, el) { $el = $(el); img = new Image(); img.onload = function() { loaded++; $el.attr('src', img.src); $el.css('opacity', 1); if (loaded >= imgs.length) { that.state.imagesLoaded = true; that.initialize(); } }; img.src = $el.attr('src') || $el.attr('data-src') || $el.attr('data-src-retina'); }); }; /** * Destroys the carousel. * @public */ Owl.prototype.destroy = function() { if (this.$element.hasClass(this.settings.themeClass)) { this.$element.removeClass(this.settings.themeClass); } if (this.settings.responsive !== false) { $(window).off('resize.owl.carousel'); } if (this.transitionEndVendor) { this.off(this.$stage.get(0), this.transitionEndVendor, this.e._transitionEnd); } for ( var i in this._plugins) { this._plugins[i].destroy(); } if (this.settings.mouseDrag || this.settings.touchDrag) { this.$stage.off('mousedown touchstart touchcancel'); $(document).off('.owl.dragEvents'); this.$stage.get(0).onselectstart = function() {}; this.$stage.off('dragstart', function() { return false }); } // remove event handlers in the ".owl.carousel" namespace this.$element.off('.owl'); this.$stage.children('.cloned').remove(); this.e = null; this.$element.removeData('owlCarousel'); this.$stage.children().contents().unwrap(); this.$stage.children().unwrap(); this.$stage.unwrap(); }; /** * Operators to calculate right-to-left and left-to-right. * @protected * @param {Number} [a] - The left side operand. * @param {String} [o] - The operator. * @param {Number} [b] - The right side operand. */ Owl.prototype.op = function(a, o, b) { var rtl = this.settings.rtl; switch (o) { case '<': return rtl ? a > b : a < b; case '>': return rtl ? a < b : a > b; case '>=': return rtl ? a <= b : a >= b; case '<=': return rtl ? a >= b : a <= b; default: break; } }; /** * Attaches to an internal event. * @protected * @param {HTMLElement} element - The event source. * @param {String} event - The event name. * @param {Function} listener - The event handler to attach. * @param {Boolean} capture - Wether the event should be handled at the capturing phase or not. */ Owl.prototype.on = function(element, event, listener, capture) { if (element.addEventListener) { element.addEventListener(event, listener, capture); } else if (element.attachEvent) { element.attachEvent('on' + event, listener); } }; /** * Detaches from an internal event. * @protected * @param {HTMLElement} element - The event source. * @param {String} event - The event name. * @param {Function} listener - The attached event handler to detach. * @param {Boolean} capture - Wether the attached event handler was registered as a capturing listener or not. */ Owl.prototype.off = function(element, event, listener, capture) { if (element.removeEventListener) { element.removeEventListener(event, listener, capture); } else if (element.detachEvent) { element.detachEvent('on' + event, listener); } }; /** * Triggers an public event. * @protected * @param {String} name - The event name. * @param {*} [data=null] - The event data. * @param {String} [namespace=.owl.carousel] - The event namespace. * @returns {Event} - The event arguments. */ Owl.prototype.trigger = function(name, data, namespace) { var status = { item: { count: this._items.length, index: this.current() } }, handler = $.camelCase( $.grep([ 'on', name, namespace ], function(v) { return v }) .join('-').toLowerCase() ), event = $.Event( [ name, 'owl', namespace || 'carousel' ].join('.').toLowerCase(), $.extend({ relatedTarget: this }, status, data) ); if (!this._supress[name]) { $.each(this._plugins, function(name, plugin) { if (plugin.onTrigger) { plugin.onTrigger(event); } }); this.$element.trigger(event); if (this.settings && typeof this.settings[handler] === 'function') { this.settings[handler].apply(this, event); } } return event; }; /** * Suppresses events. * @protected * @param {Array.} events - The events to suppress. */ Owl.prototype.suppress = function(events) { $.each(events, $.proxy(function(index, event) { this._supress[event] = true; }, this)); } /** * Releases suppressed events. * @protected * @param {Array.} events - The events to release. */ Owl.prototype.release = function(events) { $.each(events, $.proxy(function(index, event) { delete this._supress[event]; }, this)); } /** * Checks the availability of some browser features. * @protected */ Owl.prototype.browserSupport = function() { this.support3d = isPerspective(); if (this.support3d) { this.transformVendor = isTransform(); // take transitionend event name by detecting transition var endVendors = [ 'transitionend', 'webkitTransitionEnd', 'transitionend', 'oTransitionEnd' ]; this.transitionEndVendor = endVendors[isTransition()]; // take vendor name from transform name this.vendorName = this.transformVendor.replace(/Transform/i, ''); this.vendorName = this.vendorName !== '' ? '-' + this.vendorName.toLowerCase() + '-' : ''; } this.state.orientation = window.orientation; }; /** * Get touch/drag coordinats. * @private * @param {event} - mousedown/touchstart event * @returns {object} - Contains X and Y of current mouse/touch position */ function getTouches(event) { if (event.touches !== undefined) { return { x: event.touches[0].pageX, y: event.touches[0].pageY }; } if (event.touches === undefined) { if (event.pageX !== undefined) { return { x: event.pageX, y: event.pageY }; } if (event.pageX === undefined) { return { x: event.clientX, y: event.clientY }; } } } /** * Checks for CSS support. * @private * @param {Array} array - The CSS properties to check for. * @returns {Array} - Contains the supported CSS property name and its index or `false`. */ function isStyleSupported(array) { var p, s, fake = document.createElement('div'), list = array; for (p in list) { s = list[p]; if (typeof fake.style[s] !== 'undefined') { fake = null; return [ s, p ]; } } return [ false ]; } /** * Checks for CSS transition support. * @private * @todo Realy bad design * @returns {Number} */ function isTransition() { return isStyleSupported([ 'transition', 'WebkitTransition', 'MozTransition', 'OTransition' ])[1]; } /** * Checks for CSS transform support. * @private * @returns {String} The supported property name or false. */ function isTransform() { return isStyleSupported([ 'transform', 'WebkitTransform', 'MozTransform', 'OTransform', 'msTransform' ])[0]; } /** * Checks for CSS perspective support. * @private * @returns {String} The supported property name or false. */ function isPerspective() { return isStyleSupported([ 'perspective', 'webkitPerspective', 'MozPerspective', 'OPerspective', 'MsPerspective' ])[0]; } /** * Checks wether touch is supported or not. * @private * @returns {Boolean} */ function isTouchSupport() { return 'ontouchstart' in window || !!(navigator.msMaxTouchPoints); } /** * Checks wether touch is supported or not for IE. * @private * @returns {Boolean} */ function isTouchSupportIE() { return window.navigator.msPointerEnabled; } /** * The jQuery Plugin for the Owl Carousel * @public */ $.fn.owlCarousel = function(options) { return this.each(function() { if (!$(this).data('owlCarousel')) { $(this).data('owlCarousel', new Owl(this, options)); } }); }; /** * The constructor for the jQuery Plugin * @public */ $.fn.owlCarousel.Constructor = Owl; })(window.Zepto || window.jQuery, window, document); /** * Lazy Plugin * @version 2.0.0 * @author Bartosz Wojciechowski * @license The MIT License (MIT) */ ;(function($, window, document, undefined) { /** * Creates the lazy plugin. * @class The Lazy Plugin * @param {Owl} carousel - The Owl Carousel */ var Lazy = function(carousel) { /** * Reference to the core. * @protected * @type {Owl} */ this._core = carousel; /** * Already loaded items. * @protected * @type {Array.} */ this._loaded = []; /** * Event handlers. * @protected * @type {Object} */ this._handlers = { 'initialized.owl.carousel change.owl.carousel': $.proxy(function(e) { if (!e.namespace) { return; } if (!this._core.settings || !this._core.settings.lazyLoad) { return; } if ((e.property && e.property.name == 'position') || e.type == 'initialized') { var settings = this._core.settings, n = (settings.center && Math.ceil(settings.items / 2) || (settings.stagePadding > 0 && settings.items + 1) || settings.items), i = ((settings.center && n * -1) || 0), position = (e.property && e.property.value !== undefined ? e.property.value : this._core.current()) + i, clones = this._core.clones().length, load = $.proxy(function(i, v) { this.load(v) }, this); while (i <= n) { this.load(i + this._core.relative(position)); clones && $.each(this._core.clones(this._core.relative(position++)), load); i++; } } }, this) }; // set the default options this._core.options = $.extend({}, Lazy.Defaults, this._core.options); // register event handler this._core.$element.on(this._handlers); } /** * Default options. * @public */ Lazy.Defaults = { lazyLoad: false } /** * Loads all resources of an item at the specified position. * @param {Number} position - The absolute position of the item. * @protected */ Lazy.prototype.load = function(position) { var $item = this._core.$stage.children().eq(position), $elements = $item && $item.find('.owl-lazy'); if (!$elements || $.inArray($item.get(0), this._loaded) > -1) { return; } $elements.each($.proxy(function(index, element) { var $element = $(element), image, url = (window.devicePixelRatio > 1 && $element.attr('data-src-retina')) || $element.attr('data-src'); this._core.trigger('load', { element: $element, url: url }, 'lazy'); if ($element.is('img')) { $element.one('load.owl.lazy', $.proxy(function() { $element.css('opacity', 1); this._core.trigger('loaded', { element: $element, url: url }, 'lazy'); }, this)).attr('src', url); } else { image = new Image(); image.onload = $.proxy(function() { $element.css({ 'background-image': 'url(' + url + ')', 'opacity': '1' }); this._core.trigger('loaded', { element: $element, url: url }, 'lazy'); }, this); image.src = url; } }, this)); this._loaded.push($item.get(0)); } /** * Destroys the plugin. * @public */ Lazy.prototype.destroy = function() { var handler, property; for (handler in this.handlers) { this._core.$element.off(handler, this.handlers[handler]); } for (property in Object.getOwnPropertyNames(this)) { typeof this[property] != 'function' && (this[property] = null); } } $.fn.owlCarousel.Constructor.Plugins.Lazy = Lazy; })(window.Zepto || window.jQuery, window, document); /** * AutoHeight Plugin * @version 2.0.0 * @author Bartosz Wojciechowski * @license The MIT License (MIT) */ ;(function($, window, document, undefined) { /** * Creates the auto height plugin. * @class The Auto Height Plugin * @param {Owl} carousel - The Owl Carousel */ var AutoHeight = function(carousel) { /** * Reference to the core. * @protected * @type {Owl} */ this._core = carousel; /** * All event handlers. * @protected * @type {Object} */ this._handlers = { 'initialized.owl.carousel': $.proxy(function() { if (this._core.settings.autoHeight) { this.update(); } }, this), 'resized.owl.carousel': $.proxy(function() { if (this._core.settings.autoHeight) { this.update(); } }, this), 'refreshed.owl.carousel': $.proxy(function() { if (this._core.settings.autoHeight) { this.update(); } }, this), 'changed.owl.carousel': $.proxy(function(e) { if (this._core.settings.autoHeight && e.property.name == 'position'){ this.update(); } }, this), 'loaded.owl.carousel': $.proxy(function(e) { if (this._core.settings.autoHeight && e.element.closest('.' + this._core.settings.itemClass) === this._core.$stage.children().eq(this._core.current())) { this.update(); } }, this) }; // set default options this._core.options = $.extend({}, AutoHeight.Defaults, this._core.options); // register event handlers this._core.$element.on(this._handlers); }; /** * Default options. * @public */ AutoHeight.Defaults = { autoHeight: false, autoHeightClass: 'owl-height' }; /** * Updates the view. */ AutoHeight.prototype.update = function() { var start = this._core._current, end = start + this._core.settings.items, visible = this._core.$stage.children().toArray().slice(start, end); heights = [], maxheight = 0; $.each(visible, function(index, item) { $(item).css("height", $(">div", item).outerHeight()+"px"); heights.push($(item).outerHeight()); }); maxheight = Math.max.apply(null, heights); this._core.$stage.parent() .height(maxheight) .addClass(this._core.settings.autoHeightClass); }; AutoHeight.prototype.destroy = function() { var handler, property; for (handler in this._handlers) { this._core.$element.off(handler, this._handlers[handler]); } for (property in Object.getOwnPropertyNames(this)) { typeof this[property] != 'function' && (this[property] = null); } }; $.fn.owlCarousel.Constructor.Plugins.AutoHeight = AutoHeight; })(window.Zepto || window.jQuery, window, document); /** * Video Plugin * @version 2.0.0 * @author Bartosz Wojciechowski * @license The MIT License (MIT) */ ;(function($, window, document, undefined) { /** * Creates the video plugin. * @class The Video Plugin * @param {Owl} carousel - The Owl Carousel */ var Video = function(carousel) { /** * Reference to the core. * @protected * @type {Owl} */ this._core = carousel; /** * Cache all video URLs. * @protected * @type {Object} */ this._videos = {}; /** * Current playing item. * @protected * @type {jQuery} */ this._playing = null; /** * Whether this is in fullscreen or not. * @protected * @type {Boolean} */ this._fullscreen = false; /** * All event handlers. * @protected * @type {Object} */ this._handlers = { 'resize.owl.carousel': $.proxy(function(e) { if (this._core.settings.video && !this.isInFullScreen()) { e.preventDefault(); } }, this), 'refresh.owl.carousel changed.owl.carousel': $.proxy(function(e) { if (this._playing) { this.stop(); } }, this), 'prepared.owl.carousel': $.proxy(function(e) { var $element = $(e.content).find('.owl-video'); if ($element.length) { $element.css('display', 'none'); this.fetch($element, $(e.content)); } }, this) }; // set default options this._core.options = $.extend({}, Video.Defaults, this._core.options); // register event handlers this._core.$element.on(this._handlers); this._core.$element.on('click.owl.video', '.owl-video-play-icon', $.proxy(function(e) { this.play(e); }, this)); }; /** * Default options. * @public */ Video.Defaults = { video: false, videoHeight: false, videoWidth: false }; /** * Gets the video ID and the type (YouTube/Vimeo only). * @protected * @param {jQuery} target - The target containing the video data. * @param {jQuery} item - The item containing the video. */ Video.prototype.fetch = function(target, item) { var type = target.attr('data-vimeo-id') ? 'vimeo' : 'youtube', id = target.attr('data-vimeo-id') || target.attr('data-youtube-id'), width = target.attr('data-width') || this._core.settings.videoWidth, height = target.attr('data-height') || this._core.settings.videoHeight, url = target.attr('href'); if (url) { id = url.match(/(http:|https:|)\/\/(player.|www.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com))\/(video\/|embed\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/); if (id[3].indexOf('youtu') > -1) { type = 'youtube'; } else if (id[3].indexOf('vimeo') > -1) { type = 'vimeo'; } else { throw new Error('Video URL not supported.'); } id = id[6]; } else { throw new Error('Missing video URL.'); } this._videos[url] = { type: type, id: id, width: width, height: height }; item.attr('data-video', url); this.thumbnail(target, this._videos[url]); }; /** * Creates video thumbnail. * @protected * @param {jQuery} target - The target containing the video data. * @param {Object} info - The video info object. * @see `fetch` */ Video.prototype.thumbnail = function(target, video) { var tnLink, icon, path, dimensions = video.width && video.height ? 'style="width:' + video.width + 'px;height:' + video.height + 'px;"' : '', customTn = target.find('img'), srcType = 'src', lazyClass = '', settings = this._core.settings, create = function(path) { icon = '
'; if (settings.lazyLoad) { tnLink = '
'; } else { tnLink = '
'; } target.after(tnLink); target.after(icon); }; // wrap video content into owl-video-wrapper div target.wrap('
'); if (this._core.settings.lazyLoad) { srcType = 'data-src'; lazyClass = 'owl-lazy'; } // custom thumbnail if (customTn.length) { create(customTn.attr(srcType)); customTn.remove(); return false; } if (video.type === 'youtube') { path = "http://img.youtube.com/vi/" + video.id + "/hqdefault.jpg"; create(path); } else if (video.type === 'vimeo') { $.ajax({ type: 'GET', url: 'http://vimeo.com/api/v2/video/' + video.id + '.json', jsonp: 'callback', dataType: 'jsonp', success: function(data) { path = data[0].thumbnail_large; create(path); } }); } }; /** * Stops the current video. * @public */ Video.prototype.stop = function() { this._core.trigger('stop', null, 'video'); this._playing.find('.owl-video-frame').remove(); this._playing.removeClass('owl-video-playing'); this._playing = null; }; /** * Starts the current video. * @public * @param {Event} ev - The event arguments. */ Video.prototype.play = function(ev) { this._core.trigger('play', null, 'video'); if (this._playing) { this.stop(); } var target = $(ev.target || ev.srcElement), item = target.closest('.' + this._core.settings.itemClass), video = this._videos[item.attr('data-video')], width = video.width || '100%', height = video.height || this._core.$stage.height(), html, wrap; if (video.type === 'youtube') { html = ''; } else if (video.type === 'vimeo') { html = ''; } item.addClass('owl-video-playing'); this._playing = item; wrap = $('
' + html + '
'); target.after(wrap); }; /** * Checks whether an video is currently in full screen mode or not. * @todo Bad style because looks like a readonly method but changes members. * @protected * @returns {Boolean} */ Video.prototype.isInFullScreen = function() { // if Vimeo Fullscreen mode var element = document.fullscreenElement || document.mozFullScreenElement || document.webkitFullscreenElement; if (element && $(element).parent().hasClass('owl-video-frame')) { this._core.speed(0); this._fullscreen = true; } if (element && this._fullscreen && this._playing) { return false; } // comming back from fullscreen if (this._fullscreen) { this._fullscreen = false; return false; } // check full screen mode and window orientation if (this._playing) { if (this._core.state.orientation !== window.orientation) { this._core.state.orientation = window.orientation; return false; } } return true; }; /** * Destroys the plugin. */ Video.prototype.destroy = function() { var handler, property; this._core.$element.off('click.owl.video'); for (handler in this._handlers) { this._core.$element.off(handler, this._handlers[handler]); } for (property in Object.getOwnPropertyNames(this)) { typeof this[property] != 'function' && (this[property] = null); } }; $.fn.owlCarousel.Constructor.Plugins.Video = Video; })(window.Zepto || window.jQuery, window, document); /** * Animate Plugin * @version 2.0.0 * @author Bartosz Wojciechowski * @license The MIT License (MIT) */ ;(function($, window, document, undefined) { /** * Creates the animate plugin. * @class The Navigation Plugin * @param {Owl} scope - The Owl Carousel */ var Animate = function(scope) { this.core = scope; this.core.options = $.extend({}, Animate.Defaults, this.core.options); this.swapping = true; this.previous = undefined; this.next = undefined; this.handlers = { 'change.owl.carousel': $.proxy(function(e) { if (e.property.name == 'position') { this.previous = this.core.current(); this.next = e.property.value; } }, this), 'drag.owl.carousel dragged.owl.carousel translated.owl.carousel': $.proxy(function(e) { this.swapping = e.type == 'translated'; }, this), 'translate.owl.carousel': $.proxy(function(e) { if (this.swapping && (this.core.options.animateOut || this.core.options.animateIn)) { this.swap(); } }, this) }; this.core.$element.on(this.handlers); }; /** * Default options. * @public */ Animate.Defaults = { animateOut: false, animateIn: false }; /** * Toggles the animation classes whenever an translations starts. * @protected * @returns {Boolean|undefined} */ Animate.prototype.swap = function() { if (this.core.settings.items !== 1 || !this.core.support3d) { return; } this.core.speed(0); var left, clear = $.proxy(this.clear, this), previous = this.core.$stage.children().eq(this.previous), next = this.core.$stage.children().eq(this.next), incoming = this.core.settings.animateIn, outgoing = this.core.settings.animateOut; if (this.core.current() === this.previous) { return; } if (outgoing) { left = this.core.coordinates(this.previous) - this.core.coordinates(this.next); previous.css( { 'left': left + 'px' } ) .addClass('animated owl-animated-out') .addClass(outgoing) .one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', clear); } if (incoming) { next.addClass('animated owl-animated-in') .addClass(incoming) .one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', clear); } }; Animate.prototype.clear = function(e) { $(e.target).css( { 'left': '' } ) .removeClass('animated owl-animated-out owl-animated-in') .removeClass(this.core.settings.animateIn) .removeClass(this.core.settings.animateOut); this.core.transitionEnd(); } /** * Destroys the plugin. * @public */ Animate.prototype.destroy = function() { var handler, property; for (handler in this.handlers) { this.core.$element.off(handler, this.handlers[handler]); } for (property in Object.getOwnPropertyNames(this)) { typeof this[property] != 'function' && (this[property] = null); } }; $.fn.owlCarousel.Constructor.Plugins.Animate = Animate; })(window.Zepto || window.jQuery, window, document); /** * Autoplay Plugin * @version 2.0.0 * @author Bartosz Wojciechowski * @license The MIT License (MIT) */ ;(function($, window, document, undefined) { /** * Creates the autoplay plugin. * @class The Autoplay Plugin * @param {Owl} scope - The Owl Carousel */ var Autoplay = function(scope) { this.core = scope; this.core.options = $.extend({}, Autoplay.Defaults, this.core.options); this.handlers = { 'translated.owl.carousel refreshed.owl.carousel': $.proxy(function() { this.autoplay(); }, this), 'play.owl.autoplay': $.proxy(function(e, t, s) { this.play(t, s); }, this), 'stop.owl.autoplay': $.proxy(function() { this.stop(); }, this), 'mouseover.owl.autoplay': $.proxy(function() { if (this.core.settings.autoplayHoverPause) { this.pause(); } }, this), 'mouseleave.owl.autoplay': $.proxy(function() { if (this.core.settings.autoplayHoverPause) { this.autoplay(); } }, this) }; this.core.$element.on(this.handlers); }; /** * Default options. * @public */ Autoplay.Defaults = { autoplay: false, autoplayTimeout: 5000, autoplayHoverPause: false, autoplaySpeed: false }; /** * @protected * @todo Must be documented. */ Autoplay.prototype.autoplay = function() { if (this.core.settings.autoplay && !this.core.state.videoPlay) { window.clearInterval(this.interval); this.interval = window.setInterval($.proxy(function() { this.play(); }, this), this.core.settings.autoplayTimeout); } else { window.clearInterval(this.interval); } }; /** * Starts the autoplay. * @public * @param {Number} [timeout] - ... * @param {Number} [speed] - ... * @returns {Boolean|undefined} - ... * @todo Must be documented. */ Autoplay.prototype.play = function(timeout, speed) { // if tab is inactive - doesnt work in } */ this._templates = []; /** * The carousel element. * @type {jQuery} */ this.$element = this._core.$element; /** * Overridden methods of the carousel. * @protected * @type {Object} */ this._overrides = { next: this._core.next, prev: this._core.prev, to: this._core.to }; /** * All event handlers. * @protected * @type {Object} */ this._handlers = { 'prepared.owl.carousel': $.proxy(function(e) { if (this._core.settings.dotsData) { this._templates.push($(e.content).find('[data-dot]').andSelf('[data-dot]').attr('data-dot')); } }, this), 'add.owl.carousel': $.proxy(function(e) { if (this._core.settings.dotsData) { this._templates.splice(e.position, 0, $(e.content).find('[data-dot]').andSelf('[data-dot]').attr('data-dot')); } }, this), 'remove.owl.carousel prepared.owl.carousel': $.proxy(function(e) { if (this._core.settings.dotsData) { this._templates.splice(e.position, 1); } }, this), 'change.owl.carousel': $.proxy(function(e) { if (e.property.name == 'position') { if (!this._core.state.revert && !this._core.settings.loop && this._core.settings.navRewind) { var current = this._core.current(), maximum = this._core.maximum(), minimum = this._core.minimum(); e.data = e.property.value > maximum ? current >= maximum ? minimum : maximum : e.property.value < minimum ? maximum : e.property.value; } } }, this), 'changed.owl.carousel': $.proxy(function(e) { if (e.property.name == 'position') { this.draw(); } }, this), 'refreshed.owl.carousel': $.proxy(function() { if (!this._initialized) { this.initialize(); this._initialized = true; } this._core.trigger('refresh', null, 'navigation'); this.update(); this.draw(); this._core.trigger('refreshed', null, 'navigation'); }, this) }; // set default options this._core.options = $.extend({}, Navigation.Defaults, this._core.options); // register event handlers this.$element.on(this._handlers); } /** * Default options. * @public * @todo Rename `slideBy` to `navBy` */ Navigation.Defaults = { nav: false, navRewind: true, navText: [ 'prev', 'next' ], navSpeed: false, navElement: 'div', navContainer: false, navContainerClass: 'owl-nav', navClass: [ 'owl-prev', 'owl-next' ], slideBy: 1, dotClass: 'owl-dot', dotsClass: 'owl-dots', dots: true, dotsEach: false, dotData: false, dotsSpeed: false, dotsContainer: false, controlsClass: 'owl-controls' } /** * Initializes the layout of the plugin and extends the carousel. * @protected */ Navigation.prototype.initialize = function() { var $container, override, options = this._core.settings; // create the indicator template if (!options.dotsData) { this._templates = [ $('
') .addClass(options.dotClass) .append($('')) .prop('outerHTML') ]; } // create controls container if needed if (!options.navContainer || !options.dotsContainer) { this._controls.$container = $('
') .addClass(options.controlsClass) .appendTo(this.$element); } // create DOM structure for absolute navigation this._controls.$indicators = options.dotsContainer ? $(options.dotsContainer) : $('
').hide().addClass(options.dotsClass).appendTo(this._controls.$container); this._controls.$indicators.on('click', 'div', $.proxy(function(e) { var index = $(e.target).parent().is(this._controls.$indicators) ? $(e.target).index() : $(e.target).parent().index(); e.preventDefault(); this.to(index, options.dotsSpeed); }, this)); // create DOM structure for relative navigation $container = options.navContainer ? $(options.navContainer) : $('
').addClass(options.navContainerClass).prependTo(this._controls.$container); this._controls.$next = $('<' + options.navElement + '>'); this._controls.$previous = this._controls.$next.clone(); this._controls.$previous .addClass(options.navClass[0]) .html(options.navText[0]) .hide() .prependTo($container) .on('click', $.proxy(function(e) { this.prev(options.navSpeed); }, this)); this._controls.$next .addClass(options.navClass[1]) .html(options.navText[1]) .hide() .appendTo($container) .on('click', $.proxy(function(e) { this.next(options.navSpeed); }, this)); // override public methods of the carousel for (override in this._overrides) { this._core[override] = $.proxy(this[override], this); } } /** * Destroys the plugin. * @protected */ Navigation.prototype.destroy = function() { var handler, control, property, override; for (handler in this._handlers) { this.$element.off(handler, this._handlers[handler]); } for (control in this._controls) { this._controls[control].remove(); } for (override in this.overides) { this._core[override] = this._overrides[override]; } for (property in Object.getOwnPropertyNames(this)) { typeof this[property] != 'function' && (this[property] = null); } } /** * Updates the internal state. * @protected */ Navigation.prototype.update = function() { var i, j, k, options = this._core.settings, lower = this._core.clones().length / 2, upper = lower + this._core.items().length, size = options.center || options.autoWidth || options.dotData ? 1 : options.dotsEach || options.items; if (options.slideBy !== 'page') { options.slideBy = Math.min(options.slideBy, options.items); } if (options.dots || options.slideBy == 'page') { this._pages = []; for (i = lower, j = 0, k = 0; i < upper; i++) { if (j >= size || j === 0) { this._pages.push({ start: i - lower, end: i - lower + size - 1 }); j = 0, ++k; } j += this._core.mergers(this._core.relative(i)); } } } /** * Draws the user interface. * @todo The option `dotData` wont work. * @protected */ Navigation.prototype.draw = function() { var difference, i, html = '', options = this._core.settings, $items = this._core.$stage.children(), index = this._core.relative(this._core.current()); if (options.nav && !options.loop && !options.navRewind) { this._controls.$previous.toggleClass('disabled', index <= 0); this._controls.$next.toggleClass('disabled', index >= this._core.maximum()); } this._controls.$previous.toggle(options.nav); this._controls.$next.toggle(options.nav); if (options.dots) { difference = this._pages.length - this._controls.$indicators.children().length; if (options.dotData && difference !== 0) { for (i = 0; i < this._controls.$indicators.children().length; i++) { html += this._templates[this._core.relative(i)]; } this._controls.$indicators.html(html); } else if (difference > 0) { html = new Array(difference + 1).join(this._templates[0]); this._controls.$indicators.append(html); } else if (difference < 0) { this._controls.$indicators.children().slice(difference).remove(); } this._controls.$indicators.find('.active').removeClass('active'); this._controls.$indicators.children().eq($.inArray(this.current(), this._pages)).addClass('active'); } this._controls.$indicators.toggle(options.dots); } /** * Extends event data. * @protected * @param {Event} event - The event object which gets thrown. */ Navigation.prototype.onTrigger = function(event) { var settings = this._core.settings; event.page = { index: $.inArray(this.current(), this._pages), count: this._pages.length, size: settings && (settings.center || settings.autoWidth || settings.dotData ? 1 : settings.dotsEach || settings.items) }; } /** * Gets the current page position of the carousel. * @protected * @returns {Number} */ Navigation.prototype.current = function() { var index = this._core.relative(this._core.current()); return $.grep(this._pages, function(o) { return o.start <= index && o.end >= index; }).pop(); } /** * Gets the current succesor/predecessor position. * @protected * @returns {Number} */ Navigation.prototype.getPosition = function(successor) { var position, length, options = this._core.settings; if (options.slideBy == 'page') { position = $.inArray(this.current(), this._pages); length = this._pages.length; successor ? ++position : --position; position = this._pages[((position % length) + length) % length].start; } else { position = this._core.relative(this._core.current()); length = this._core.items().length; successor ? position += options.slideBy : position -= options.slideBy; } return position; } /** * Slides to the next item or page. * @public * @param {Number} [speed=false] - The time in milliseconds for the transition. */ Navigation.prototype.next = function(speed) { $.proxy(this._overrides.to, this._core)(this.getPosition(true), speed); } /** * Slides to the previous item or page. * @public * @param {Number} [speed=false] - The time in milliseconds for the transition. */ Navigation.prototype.prev = function(speed) { $.proxy(this._overrides.to, this._core)(this.getPosition(false), speed); } /** * Slides to the specified item or page. * @public * @param {Number} position - The position of the item or page. * @param {Number} [speed] - The time in milliseconds for the transition. * @param {Boolean} [standard=false] - Whether to use the standard behaviour or not. */ Navigation.prototype.to = function(position, speed, standard) { var length; if (!standard) { length = this._pages.length; $.proxy(this._overrides.to, this._core)(this._pages[((position % length) + length) % length].start, speed); } else { $.proxy(this._overrides.to, this._core)(position, speed); } } $.fn.owlCarousel.Constructor.Plugins.Navigation = Navigation; })(window.Zepto || window.jQuery, window, document); /** * Hash Plugin * @version 2.0.0 * @author Artus Kolanowski * @license The MIT License (MIT) */ ;(function($, window, document, undefined) { 'use strict'; /** * Creates the hash plugin. * @class The Hash Plugin * @param {Owl} carousel - The Owl Carousel */ var Hash = function(carousel) { /** * Reference to the core. * @protected * @type {Owl} */ this._core = carousel; /** * Hash table for the hashes. * @protected * @type {Object} */ this._hashes = {}; /** * The carousel element. * @type {jQuery} */ this.$element = this._core.$element; /** * All event handlers. * @protected * @type {Object} */ this._handlers = { 'initialized.owl.carousel': $.proxy(function() { if (this._core.settings.startPosition == 'URLHash') { $(window).trigger('hashchange.owl.navigation'); } }, this), 'prepared.owl.carousel': $.proxy(function(e) { var hash = $(e.content).find('[data-hash]').andSelf('[data-hash]').attr('data-hash'); this._hashes[hash] = e.content; }, this) }; // set default options this._core.options = $.extend({}, Hash.Defaults, this._core.options); // register the event handlers this.$element.on(this._handlers); // register event listener for hash navigation $(window).on('hashchange.owl.navigation', $.proxy(function() { var hash = window.location.hash.substring(1), items = this._core.$stage.children(), position = this._hashes[hash] && items.index(this._hashes[hash]) || 0; if (!hash) { return false; } this._core.to(position, false, true); }, this)); } /** * Default options. * @public */ Hash.Defaults = { URLhashListener: false } /** * Destroys the plugin. * @public */ Hash.prototype.destroy = function() { var handler, property; $(window).off('hashchange.owl.navigation'); for (handler in this._handlers) { this._core.$element.off(handler, this._handlers[handler]); } for (property in Object.getOwnPropertyNames(this)) { typeof this[property] != 'function' && (this[property] = null); } } $.fn.owlCarousel.Constructor.Plugins.Hash = Hash; })(window.Zepto || window.jQuery, window, document); // source --> https://demolicionescordoba.es/wp-content/plugins/wp-posts-carousel/owl.carousel/jquery.mousewheel.min.js /*! Copyright (c) 2013 Brandon Aaron (http://brandon.aaron.sh) * Licensed under the MIT License (LICENSE.txt). * * Version: 3.1.12 * * Requires: jQuery 1.2.2+ */ !function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a:a(jQuery)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})}); // source --> https://demolicionescordoba.es/wp-content/plugins/essential-grid/public/assets/js/jquery.themepunch.essential.min.js /************************************************************************************ * jquery.themepunch.essential.js - jQuery Plugin for esg Portfolio Slider * @version: 1.5.4 (20.11.2014) * @requires jQuery v1.7 or later (tested on 1.9) * @author ThemePunch ************************************************************************************/ //! ++++++++++++++++++++++++++++++++++++++ (function(jQuery,undefined){function checkAvailableFilters(e,t){}function checkMoreToLoad(e,t){var n=new Array;jQuery(t.filterGroupClass+".esg-filter-wrapper .esg-filterbutton.selected, "+t.filterGroupClass+" .esg-filter-wrapper .esg-filterbutton.selected").each(function(){n.push(jQuery(this).data("fid"))});if(jQuery(t.filterGroupClass+".esg-filter-wrapper .esg-filterbutton.selected, "+t.filterGroupClass+" .esg-filter-wrapper .esg-filterbutton.selected").length==0)n.push(-1);var r=new Array;for(var i=0;i0)return false;e.append('
'+'
'+'
'+'
'+'
'+'
'+"
");if(t.spinner=="spinner1"||t.spinner=="spinner2")e.find(".esg-loader").css({backgroundColor:t.spinnerColor});if(t.spinner=="spinner3"||t.spinner=="spinner4")e.find(".punchgs.Bounce1, .punchgs.Bounce2, .punchgs.Bounce3, .dot1, .dot2").css({backgroundColor:t.spinnerColor});punchgs.TweenLite.to(e,.3,{minHeight:"100px",zIndex:0})}function setKeyToNull(e,t){jQuery.each(e.loadMoreItems,function(n,r){if(r[0]==t)e.loadMoreItems[n][0]=-1})}function loadMoreEmpty(e){var t=true;for(var n=0;n0){var s=e.find(".esg-loadmore");if(s.length>0){punchgs.TweenLite.to(s,.4,{autoAlpha:.2});s.data("loading",1)}var o={action:t.loadMoreAjaxAction,client_action:"load_more_items",token:t.loadMoreAjaxToken,data:r,gridid:t.gridID};jQuery.ajax({type:"post",url:t.loadMoreAjaxUrl,dataType:"json",data:o}).success(function(n,r,s){if(n.success){e.find("ul").first().append(n.data);checkAvailableFilters(e,t);prepareItemsInGrid(t,true);setItemsOnPages(t);setTimeout(function(){t.animDelay="off";organiseGrid(t);prepareSortingAndOrders(e);if(loadMoreEmpty(t))e.find(".esg-loadmore").remove();else{var n=e.find(".esg-loadmore"),r=t.loadMoreTxt+" ("+i+")";if(t.loadMoreNr=="off")r=t.loadMoreTxt;if(i==0)n.html(t.loadMoreEndTxt);else n.html(r);if(n.length>0){punchgs.TweenLite.to(n,.4,{autoAlpha:1,overwrite:"all"});n.data("loading",0)}}setTimeout(function(){t.animDelay="on"},500)},10)}}).error(function(t,n,r){e.find(".esg-loadmore").html("FAILURE: "+n)})}else{if(loadMoreEmpty(t)){e.find(".esg-loadmore").remove()}else{e.find(".esg-loadmore").html(t.loadMoreEndTxt)}}}function killOldCustomAjaxContent(e){var t=e.data("lastposttype"),n=e.data("oldajaxsource"),r=e.data("oldajaxtype"),i=e.data("oldajaxvideoaspect"),s=e.data("oldselector");if(t!=undefined&&t!=""){try{jQuery.each(jQuery.fn.tpessential.defaults.ajaxTypes,function(o,u){if(u!=undefined&&u.type!=undefined){if(u.type==t&&u.killfunc!=undefined)setTimeout(function(){if(u.killfunc.call(this,{id:n,type:r,aspectratio:i,selector:s})){e.empty()}},250)}})}catch(o){console.log(o)}}e.data("lastposttype","")}function addAjaxNavigagtion(e,t){function i(e){var t=new Array;jQuery.each(e,function(e,n){if(jQuery(n).closest(".itemtoshow.isvisiblenow").length>0)t.push(n)});return t}var n=" eg-acp-"+e.ajaxClosePosition;n=n+" eg-acp-"+e.ajaxCloseStyle,n=n+" eg-acp-"+e.ajaxCloseType,loc="eg-icon-left-open-1",roc="eg-icon-right-open-1",xoc='';if(e.ajaxCloseType=="type1"){loc="eg-icon-left-open-big";roc="eg-icon-right-open-big";e.ajaxCloseTxt="";xoc="X"}if(e.ajaxCloseInner=="true"||e.ajaxCloseInner==true)n=n+" eg-acp-inner";var r='
';if(e.ajaxClosePosition=="tr"||e.ajaxClosePosition=="br"){if(e.ajaxNavButton=="on")r=r+'
';if(e.ajaxCloseButton=="on")r=r+'
'+xoc+e.ajaxCloseTxt+"
"}else{if(e.ajaxCloseButton=="on")r=r+'
'+xoc+e.ajaxCloseTxt+"
";if(e.ajaxNavButton=="on")r=r+'
'}r=r+"
";switch(e.ajaxClosePosition){case"tl":case"tr":case"t":t.prepend(r);break;case"bl":case"br":case"b":t.append(r);break}t.find(".eg-ajax-closer").click(function(){showHideAjaxContainer(t,false,null,null,.25,true)});t.find(".eg-ajax-right").click(function(){var e=t.data("container").find(".lastclickedajax").closest("li"),n=e.nextAll().find(".eg-ajax-a-button"),r=e.prevAll().find(".eg-ajax-a-button");n=i(n);r=i(r);if(n.length>0){n[0].click()}else{r[0].click()}});t.find(".eg-ajax-left").click(function(){var e=t.data("container").find(".lastclickedajax").closest("li"),n=e.nextAll().find(".eg-ajax-a-button"),r=e.prevAll().find(".eg-ajax-a-button");n=i(n);r=i(r);if(r.length>0){r[r.length-1].click()}else{n[n.length-1].click()}})}function showHideAjaxContainer(e,t,n,r,i,s){i=i==undefined?.25:i;var o=e.data("container").data("opt"),u=e.data("lastheight")!=undefined?e.data("lastheight"):"100px";if(!t){if(s){killOldCustomAjaxContent(e);u="0px"}punchgs.TweenLite.to(e.parent(),i,{height:u,ease:punchgs.Power2.easeInOut,onStart:function(){punchgs.TweenLite.to(e,i,{autoAlpha:0,ease:punchgs.Power3.easeOut})},onComplete:function(){setTimeout(function(){if(s)e.html("")},300)}})}else{i=i+1.2;addAjaxNavigagtion(o,e);punchgs.TweenLite.set(e,{height:"auto"});punchgs.TweenLite.set(e.parent(),{minHeight:0,maxHeight:"none",height:"auto",overwrite:"all"});punchgs.TweenLite.from(e,i,{height:u,ease:punchgs.Power3.easeInOut,onStart:function(){punchgs.TweenLite.to(e,i,{autoAlpha:1,ease:punchgs.Power3.easeOut})},onComplete:function(){e.data("lastheight",e.height());jQuery(window).trigger("resize.essg");if(e.find(".eg-ajax-closer-wrapper").length==0)addAjaxNavigagtion(o,e)}});if(o.ajaxScrollToOnLoad!="off")jQuery("html, body").animate({scrollTop:e.offset().top-r},{queue:false,speed:.5})}}function removeLoader(e){e.closest(".eg-ajaxanimwrapper").find(".esg-loader").remove()}function ajaxCallBack(opt,a){if(opt.ajaxCallback==undefined||opt.ajaxCallback==""||opt.ajaxCallback.length<3)return false;var splitter=opt.ajaxCallback.split(")"),splitter=splitter[0].split("("),callback=splitter[0],arguments=splitter.length>1&&splitter[1]!=""?splitter[1]+",":"",obj=new Object;try{obj.containerid="#"+opt.ajaxContentTarget,obj.postsource=a.data("ajaxsource"),obj.posttype=a.data("ajaxtype");if(opt.ajaxCallbackArgument=="on")eval(callback+"("+arguments+"obj)");else eval(callback+"("+arguments+")")}catch(e){console.log("Callback Error");console.log(e)}}function loadMoreContent(e,t,n){e.find(".lastclickedajax").removeClass("lastclickedajax");n.addClass("lastclickedajax");var r=jQuery("#"+t.ajaxContentTarget).find(".eg-ajax-target"),i=n.data("ajaxsource"),s=n.data("ajaxtype"),o=n.data("ajaxvideoaspect");r.data("container",e);if(o=="16:9")o="widevideo";else o="normalvideo";showHideAjaxContainer(r,false);if(r.length>0){if(t.ajaxJsUrl!=undefined&&t.ajaxJsUrl!=""&&t.ajaxJsUrl.length>3){jQuery.getScript(t.ajaxJsUrl).done(function(e,n){t.ajaxJsUrl=""}).fail(function(e,n,r){console.log("Loading Error on Ajax jQuery File. Please doublecheck if JS File and Path exist:"+t.ajaxJSUrl);t.ajaxJsUrl=""})}if(t.ajaxCssUrl!=undefined&&t.ajaxCssUrl!=""&&t.ajaxCssUrl.length>3){jQuery("").appendTo("head").attr({type:"text/css",rel:"stylesheet"}).attr("href",t.ajaxCssUrl);t.ajaxCssUrl==""}buildLoader(r.closest(".eg-ajaxanimwrapper"),t);if(r.data("ajaxload")!=undefined)r.data("ajaxload").abort();killOldCustomAjaxContent(r);switch(s){case"postid":var u={action:t.loadMoreAjaxAction,client_action:"load_more_content",token:t.loadMoreAjaxToken,postid:i};setTimeout(function(){r.data("ajaxload",jQuery.ajax({type:"post",url:t.loadMoreAjaxUrl,dataType:"json",data:u}));r.data("ajaxload").success(function(e,i,s){if(e.success){jQuery(r).html(e.data);showHideAjaxContainer(r,true,t.ajaxScrollToOnLoad,t.ajaxScrollToOffset);removeLoader(r);ajaxCallBack(t,n)}});r.data("ajaxload").error(function(e,t,n){if(t!="abort"){jQuery(r).append("

FAILURE: "+t+"

");removeLoader(r)}})},300);break;case"youtubeid":setTimeout(function(){r.html('
');removeLoader(r);showHideAjaxContainer(r,true,t.ajaxScrollToOnLoad,t.ajaxScrollToOffset);ajaxCallBack(t,n)},300);break;case"vimeoid":setTimeout(function(){r.html('
');removeLoader(r);showHideAjaxContainer(r,true,t.ajaxScrollToOnLoad,t.ajaxScrollToOffset);ajaxCallBack(t,n)},300);break;case"html5vid":i=i.split("|");setTimeout(function(){r.html('');removeLoader(r);showHideAjaxContainer(r,true,t.ajaxScrollToOnLoad,t.ajaxScrollToOffset);ajaxCallBack(t,n)},300);break;case"soundcloud":case"soundcloudid":setTimeout(function(){r.html('');removeLoader(r);showHideAjaxContainer(r,true,t.ajaxScrollToOnLoad,t.ajaxScrollToOffset);ajaxCallBack(t,n)},300);break;case"imageurl":setTimeout(function(){var e=new Image;e.onload=function(){var e=jQuery(this);r.html("");e.css({width:"100%",height:"auto"});r.append(jQuery(this));removeLoader(r);showHideAjaxContainer(r,true,t.ajaxScrollToOnLoad,t.ajaxScrollToOffset);ajaxCallBack(t,n)};e.onerror=function(e){r.html("Error");removeLoader(r);showHideAjaxContainer(r,true,t.ajaxScrollToOnLoad,t.ajaxScrollToOffset)};e.src=i},300);break;default:jQuery.each(jQuery.fn.tpessential.defaults.ajaxTypes,function(e,n){if(n.openAnimationSpeed==undefined)n.openAnimationSpeed=0;if(n!=undefined&&n.type!=undefined){if(n.type==s){setTimeout(function(){r.data("lastposttype",s);r.data("oldajaxsource",i);r.data("oldajaxtype",s);r.data("oldajaxvideoaspect",o);r.data("oldselector","#"+t.ajaxContentTarget+" .eg-ajax-target");showHideAjaxContainer(r,true,t.ajaxScrollToOnLoad,t.ajaxScrollToOffset,0);r.html(n.func.call(this,{id:i,type:s,aspectratio:o}));removeLoader(r)},300)}}});break}}}function mainPreparing(e,t){var n=e.find(".eg-leftright-container");var r=getBestFitColumn(t,jQuery(window).width(),"id");t.column=r.column;t.columnindex=r.index;prepareItemsInGrid(t);organiseGrid(t);jQuery(t.filterGroupClass+".esg-filter-wrapper,"+t.filterGroupClass+" .esg-filter-wrapper").each(function(e){var t=jQuery(this);if(t.hasClass("dropdownstyle")){t.find(".esg-filter-checked").each(function(){jQuery(this).prependTo(jQuery(this).parent())});if(!is_mobile()){t.hover(function(){var e=jQuery(this).closest(".esg-filter-wrapper");e.find(".esg-selected-filterbutton").addClass("hoveredfilter");e.find(".esg-dropdown-wrapper").stop().slideDown(200)},function(){var e=jQuery(this).closest(".esg-filter-wrapper");e.find(".esg-selected-filterbutton").removeClass("hoveredfilter");e.find(".esg-dropdown-wrapper").stop().slideUp(200)})}else{t.find(".esg-selected-filterbutton").click(function(){var e=t.find(".esg-selected-filterbutton");if(e.hasClass("hoveredfilter")){setTimeout(function(){e.removeClass("hoveredfilter")},200);t.find(".esg-dropdown-wrapper").stop().slideUp(200);punchgs.TweenLite.to(t.find(".eg-icon-down-open"),.3,{scaleY:1})}else{setTimeout(function(){e.addClass("hoveredfilter")},200);t.find(".esg-dropdown-wrapper").stop().slideDown(200);punchgs.TweenLite.to(t.find(".eg-icon-down-open"),.3,{scaleY:-1})}})}}});jQuery(t.filterGroupClass+".esg-left,"+t.filterGroupClass+" .esg-left").click(function(){t=getOptions(e);t.oldpage=t.currentpage;t.currentpage--;if(t.currentpage<0)t.currentpage=t.realmaxpage-1;var n=getBestFitColumn(t,jQuery(window).width(),"id");t.column=n.column;t.columnindex=n.index;setItemsOnPages(t);organiseGrid(t,"right");setOptions(e,t);stopAllVideos(true)});jQuery(t.filterGroupClass+".esg-right,"+t.filterGroupClass+" .esg-right").click(function(){t=getOptions(e);t.oldpage=t.currentpage;t.currentpage++;if(t.currentpage>=t.realmaxpage)t.currentpage=0;var n=getBestFitColumn(t,jQuery(window).width(),"id");t.column=n.column;t.columnindex=n.index;setItemsOnPages(t);organiseGrid(t,"right");setOptions(e,t);stopAllVideos(true)});jQuery(t.filterGroupClass+".esg-filterbutton, "+t.filterGroupClass+" .esg-filterbutton").each(function(){if(!jQuery(this).hasClass("esg-pagination-button"))jQuery(this).click(function(){var t=getOptions(e);stopAllVideos(true);var n=jQuery(this);if(!n.hasClass("esg-pagination-button")){jQuery(t.filterGroupClass+".esg-allfilter, "+t.filterGroupClass+" .esg-allfilter").removeClass("selected");if(n.hasClass("esg-allfilter")){jQuery(t.filterGroupClass+".esg-filterbutton, "+t.filterGroupClass+" .esg-filterbutton").each(function(){jQuery(this).removeClass("selected")})}}if(n.closest(".esg-filters").hasClass("esg-singlefilters")||t.filterType=="single"){jQuery(t.filterGroupClass+".esg-filterbutton, "+t.filterGroupClass+" .esg-filterbutton").each(function(){jQuery(this).removeClass("selected")});n.addClass("selected")}else{if(n.hasClass("selected"))n.removeClass("selected");else n.addClass("selected")}var r=0;jQuery(t.filterGroupClass+".esg-filterbutton.selected,"+t.filterGroupClass+" .esg-filterbutton.selected").each(function(){if(jQuery(this).hasClass("selected")&&!jQuery(this).hasClass("esg-pagination-button"))r++});if(r==0)jQuery(t.filterGroupClass+".esg-allfilter,"+t.filterGroupClass+" .esg-allfilter").addClass("selected");t.filterchanged=true;t.currentpage=0;if(t.maxpage==1){jQuery(t.filterGroupClass+".navigationbuttons,"+t.filterGroupClass+" .navigationbuttons").css({display:"none"});jQuery(t.filterGroupClass+".esg-pagination,"+t.filterGroupClass+" .esg-pagination").css({display:"none"})}else{jQuery(t.filterGroupClass+".navigationbuttons,"+t.filterGroupClass+" .navigationbuttons").css({display:"inline-block"});jQuery(t.filterGroupClass+".esg-pagination,"+t.filterGroupClass+" .esg-pagination").css({display:"inline-block"})}var i=e.find(".esg-loadmore");if(i.length>0){var s=checkMoreToLoad(e,t).length;if(s>0)i.html(t.loadMoreTxt+" ("+s+")");else i.html(t.loadMoreEndTxt)}setItemsOnPages(t);organiseGrid(t);setOptions(e,t)})});var i;jQuery(window).on("resize.essg",function(){clearTimeout(i);if(t.forceFullWidth=="on"||t.forceFullScreen=="on"){var r=e.parent().parent().find(".esg-relative-placeholder").offset().left;e.closest(".esg-container-fullscreen-forcer").css({left:0-r,width:jQuery(window).width()})}else e.closest(".esg-container-fullscreen-forcer").css({left:0,width:"auto"});if(n.length>0){var s=n.outerWidth(true);punchgs.TweenLite.set(e.find(".esg-overflowtrick"),{width:e.width()-s,overwrite:"all"})}var o=getBestFitColumn(t,jQuery(window).width(),"id");t.column=o.column;t.columnindex=o.index;setOptions(e,t);i=setTimeout(function(){t=getOptions(e);setItemsOnPages(t);organiseGrid(t);setOptions(e,t)},200)});e.on("itemsinposition",function(){var e=jQuery(this);var t=getOptions(e);var n=e.find(".eg-leftright-container");clearTimeout(e.data("callednow"));if(t.maxheight>0&&t.maxheight<9999999999){t.inanimation=false;var r=e.find(".esg-overflowtrick").first();var i=e.find("ul").first();var n=e.find(".eg-leftright-container");var s=parseInt(r.css("paddingTop"),0);s=s==undefined?0:s;s=s==null?0:s;var o=parseInt(r.css("paddingBottom"),0);o=o==undefined?0:o;o=o==null?0:o;var u=t.maxheight+t.overflowoffset+s+o;if(t.forceFullScreen=="on"){var a=jQuery(window).height();if(t.fullScreenOffsetContainer!=undefined){try{var f=t.fullScreenOffsetContainer.split(",");jQuery.each(f,function(e,n){a=a-jQuery(n).outerHeight(true);if(a0)punchgs.TweenLite.set(n,{minHeight:u,ease:punchgs.Power3.easeInOut});var h=jQuery(t.filterGroupClass+".esg-navbutton-solo-left,"+t.filterGroupClass+" .esg-navbutton-solo-left");var p=jQuery(t.filterGroupClass+".esg-navbutton-solo-right,"+t.filterGroupClass+" .esg-navbutton-solo-right");if(h.length>0)h.css({marginTop:0-h.height()/2});if(p.length>0)p.css({marginTop:0-p.height()/2})}e.data("callednow",setTimeout(function(){e.find(".itemtoshow.isvisiblenow").each(function(){hideUnderElems(jQuery(this))})},250))});prepareSortingAndOrders(e);prepareSortingClicks(e)}function prepareSortingAndOrders(e){var t=getOptions(e);e.find(".tp-esg-item").each(function(){var e=new Date(jQuery(this).data("date"));jQuery(this).data("date",e.getTime()/1e3)});jQuery(t.filterGroupClass+".esg-sortbutton-order,"+t.filterGroupClass+" .esg-sortbutton-order").each(function(){var e=jQuery(this);e.removeClass("tp-desc").addClass("tp-asc");e.data("dir","asc")})}function prepareSortingClicks(e){opt=getOptions(e);var t;jQuery(opt.filterGroupClass+".esg-sortbutton-wrapper .esg-sortbutton-order,"+opt.filterGroupClass+" .esg-sortbutton-wrapper .esg-sortbutton-order").click(function(){var n=jQuery(this);if(n.hasClass("tp-desc")){n.removeClass("tp-desc").addClass("tp-asc");n.data("dir","asc")}else{n.removeClass("tp-asc").addClass("tp-desc");n.data("dir","desc")}var r=n.data("dir");stopAllVideos(true,true);jQuery(opt.filterGroupClass+".esg-sorting-select,"+opt.filterGroupClass+" .esg-sorting-select").each(function(){var n=jQuery(this).val();clearTimeout(t);e.find(".tp-esg-item").tsort({data:n,forceStrings:"false",order:r});t=setTimeout(function(){opt=getOptions(e);setItemsOnPages(opt);organiseGrid(opt);setOptions(e,opt)},200)})});jQuery(opt.filterGroupClass+".esg-sorting-select,"+opt.filterGroupClass+" .esg-sorting-select").each(function(){var n=jQuery(this);n.change(function(){e.find("iframe").css({visibility:"hidden"});e.find(".video-eg").css({visibility:"hidden"});var r=jQuery(this).closest(".esg-sortbutton-wrapper").find(".esg-sortbutton-order");var i=n.val();var s=n.find("option:selected").text();var o=r.data("dir");stopAllVideos(true,true);clearTimeout(t);n.parent().parent().find(".sortby_data").text(s);e.find(".tp-esg-item").tsort({data:i,forceStrings:"false",order:o});t=setTimeout(function(){opt=getOptions(e);setItemsOnPages(opt);organiseGrid(opt);setOptions(e,opt)},500)})})}function fixCenteredCoverElement(e,t,n){if(t==undefined)t=e.find(".esg-entry-cover");if(n==undefined)n=e.find(".esg-entry-media");if(t&&n){var r=n.height();punchgs.TweenLite.set(t,{height:r});var i=e.find(".esg-cc");punchgs.TweenLite.set(i,{top:(r-i.height())/2})}}function getBestFitColumn(e,t,n){var r=t,i=0,s=9999,o=0,u=e.column,a=e.column,f=e.column,l=0,c=0;if(e.responsiveEntries!=undefined&&e.responsiveEntries.length>0)jQuery.each(e.responsiveEntries,function(e,t){var n=t.width!=undefined?t.width:0,a=t.amount!=undefined?t.amount:0;if(s>n){s=n;u=a;c=e}if(oi&&n<=r){i=n;f=a;l=e}});if(s>t){f=u;l=c}var h=new Object;h.index=l;h.column=f;if(n=="id")return h;else return f}function getOptions(e){return e.data("opt")}function setOptions(e,t){e.data("opt",t)}function checkMediaListeners(e){e.find("iframe").each(function(e){var t=jQuery(this);if(t.attr("src").toLowerCase().indexOf("youtube")>0)prepareYT(t);else if(t.attr("src").toLowerCase().indexOf("vimeo")>0)prepareVimeo(t);else if(t.attr("src").toLowerCase().indexOf("soundcloud")>0)prepareSoundCloud(t)});e.find("video").each(function(e){prepareVideo(jQuery(this))})}function waitMediaListeners(e){var t=setInterval(function(){e.find("iframe").each(function(e){var n=jQuery(this);if(n.attr("src").toLowerCase().indexOf("youtube")>0){if(prepareYT(n)){clearInterval(t)}}else if(n.attr("src").toLowerCase().indexOf("vimeo")>0){if(prepareVimeo(n)){clearInterval(t)}}else if(n.attr("src").toLowerCase().indexOf("soundcloud")>0){if(prepareSoundCloud(n)){clearInterval(t)}}else clearInterval(t)});e.find("video").each(function(e){if(prepareVideo(jQuery(this))){clearInterval(t)}})},50)}function directionPrepare(e,t,n,r,i){var s=new Object;switch(e){case 0:s.x=0;s.y=t=="in"?0-r:10+r;s.y=i&&t=="in"?s.y-5:s.y;break;case 1:s.y=0;s.x=t=="in"?n:-10-n;s.x=i&&t=="in"?s.x+5:s.x;break;case 2:s.y=t=="in"?r:-10-r;s.x=0;s.y=i&&t=="in"?s.y+5:s.y;break;case 3:s.y=0;s.x=t=="in"?0-n:10+n;s.x=i&&t=="in"?s.x-5:s.x;break}return s}function getDir(e,t){var n=e.width(),r=e.height(),i=(t.x-e.offset().left-n/2)*(n>r?r/n:1),s=(t.y-e.offset().top-r/2)*(r>n?n/r:1),o=Math.round((Math.atan2(s,i)*(180/Math.PI)+180)/90+3)%4;return o}function hideUnderElems(e){e.find(".eg-handlehideunder").each(function(){var t=jQuery(this);var n=t.data("hideunder"),r=t.data("hideunderheight"),i=t.data("hidetype");if(t.data("knowndisplay")==undefined)t.data("knowndisplay",t.css("display"));if(e.width()n.height()+40||e==0||n.data("bh")!=0&&n.data("bh")!=undefined&&t.position().top+t.height()>parseInt(n.data("bh"),0)+40){if(n.data("bh")==undefined||n.data("bh")==0)n.data("bh",n.height());if(r.data("bh")==undefined||r.data("bh")==0)r.data("bh",r.height());var i=n.data("bh"),s=r.data("bh");if(e!=0){n.data("alreadyinoff",false);punchgs.TweenLite.to(n,.2,{height:i+e});punchgs.TweenLite.to(r,.2,{height:s+e})}else{if(!n.data("alreadyinoff")){n.data("alreadyinoff",true);punchgs.TweenLite.to(n,.3,{height:i,ease:punchgs.Power3.easeIn,onComplete:function(){n.data("bh",0);r.data("bh",0);n.data("alreadyinoff",false)}});punchgs.TweenLite.to(r,.3,{height:s,ease:punchgs.Power3.easeIn,onComplete:function(){n.data("bh",0);r.data("bh",0);n.data("alreadyinoff",false)}})}}}}function itemHoverAnim(e,t,n,r){if(e.data("simplevideo")!=1)checkMediaListeners(e);var i=false;var s=e.find(".esg-media-poster");if(s.length>0){if(s.css("opacity")==0)i=true}if(e.find(".isplaying, .isinpause").length>0||i)return false;clearTimeout(e.data("hovertimer"));var o=n.mainhoverdelay;if(t=="set")o=0;e.data("hovertimer",setTimeout(function(){e.data("animstarted",1);punchgs.TweenLite.set(e,{z:.01,x:0,y:0,rotationX:0,rotationY:0,rotationZ:0});e.addClass("esg-hovered");var i=e.find(".esg-entry-cover");punchgs.TweenLite.set(i,{transformStyle:"flat"});if(t!="set")fixCenteredCoverElement(e,i);if(e.find(".esg-entry-content").length>0&&t!="set"&&n.layout=="even"){var s=e.data("pt"),o=e.data("pb"),u=e.data("pl"),a=e.data("pr"),f=e.data("bt"),l=e.data("bb"),c=e.data("bl"),h=e.data("br");e.data("hhh",e.outerHeight());e.data("www",e.outerWidth());punchgs.TweenLite.set(e.find(".esg-entry-content"),{display:"block"});punchgs.TweenLite.set(e.find(".esg-entry-media"),{height:e.data("hhh")});punchgs.TweenLite.set(e,{z:.1,zIndex:50,x:0-(u+a+h+c)/2,y:0-(s+o+f+l)/2,height:"auto",width:e.data("www")+u+a+c+h});if(n.evenGridMasonrySkinPusher=="on"){var p=e.height()-e.data("hhh");offsetParrents(p,e)}e.css({paddingTop:s+"px",paddingLeft:u+"px",paddingRight:a+"px",paddingBottom:a+"px"});e.css({borderTopWidth:f+"px",borderBottomWidth:l+"px",borderLeftWidth:c+"px",borderRightWidth:h+"px"});if(n.inanimation!=true)punchgs.TweenLite.set(e.closest(".esg-overflowtrick"),{overflow:"visible",overwrite:"all"})}jQuery.each(esgAnimmatrix,function(n,i){e.find(i[0]).each(function(){var n=jQuery(this),s=n.data("delay")!=undefined?n.data("delay"):0;animfrom=i[2];animto=i[3];animto.delay=s;animto.overwrite="all";animfrom.overwrite="all";animto.transformStyle="flat";animto.force3D=true;var o=0;var u=i[0].indexOf("out")>-1;if(!n.hasClass("esg-entry-media")&&!u)animto.clearProps="transform";animto.z=.001;if(animfrom.transformPerspective==undefined)animfrom.transformPerspective=1e3;if(n.hasClass("esg-overlay")){if(animfrom.z==undefined)animfrom.z=-.002;animto.z=-10.0001}var a=n;var f=false;if(n.hasClass("esg-entry-media")&&n.find(".esg-media-video").length>0)return true;punchgs.TweenLite.killTweensOf(a,false);if(t=="set")punchgs.TweenLite.set(a,animfrom);else switch(i[0]){case".esg-shifttotop":animto.y=0-e.find(".esg-bc.eec").last().height();punchgs.TweenLite.fromTo(n,.5,{y:0},{y:animto.y});break;case".esg-slide":var l=directionPrepare(r,"in",e.width(),e.height());var c=new Object;var h=new Object;jQuery.extend(c,animfrom);jQuery.extend(h,animto);c.css.x=l.x;c.css.y=l.y;punchgs.TweenLite.fromTo(a,i[1],c,h,o);break;case".esg-slideout":var l=directionPrepare(r,"out",e.width(),e.height());var c=new Object;var h=new Object;jQuery.extend(c,animfrom);jQuery.extend(h,animto);h.x=l.x;h.y=l.y;h.clearProps="";punchgs.TweenLite.fromTo(a,i[1],c,h,o);break;default:punchgs.TweenLite.fromTo(a,i[1],animfrom,animto,o);break}})})},o))}function videoClickEvent(e,t,n,r){e.css({transform:"none","-moz-transform":"none","-webkit-transform":"none"});e.closest(".esg-overflowtrick").css({transform:"none","-moz-transform":"none","-webkit-transform":"none"});e.closest("ul").css({transform:"none","-moz-transform":"none","-webkit-transform":"none"});if(!r)e.find(".esg-media-video").each(function(){var t=jQuery(this);if(t.data("youtube")!=undefined&&e.find(".esg-youtube-frame").length==0){var n=e.find(".esg-entry-media");var r="https://www.youtube.com/embed/"+t.data("youtube")+"?version=3&enablejsapi=1&html5=1&controls=1&autohide=1&rel=0&showinfo=0";n.append('')}if(t.data("vimeo")!=undefined&&e.find(".esg-vimeo-frame").length==0){var n=e.find(".esg-entry-media");var i="http://player.vimeo.com/video/"+t.data("youtube")+"?title=0&byline=0&html5=1&portrait=0&api=1;";n.append('')}if(t.data("soundcloud")!=undefined&&e.find(".esg-soundcloud-frame").length==0){var n=e.find(".esg-entry-media");var s="https://w.soundcloud.com/player/?url=https://api.soundcloud.com/tracks/"+t.data("soundcloud")+"&auto_play=false&hide_related=false&visual=true&show_artwork=true";n.append('')}if((t.data("mp4")!=undefined||t.data("webm")!=undefined||t.data("ogv")!=undefined)&&e.find(".esg-video-frame").length==0){var n=e.find(".esg-entry-media");n.append('
")}}else{v.append('
1
');v.append('
...
');for(var o=e.currentpage-1;o'+(o+1)+"
")}v.append('
...
');v.append('
'+g+"
")}}else{for(var o=0;o'+(o+1)+"
")}}if(e.maxpage==1){jQuery(e.filterGroupClass+".esg-navigationbutton,"+e.filterGroupClass+" .esg-navigationbutton").not(".esg-loadmore").css({display:"none"});v.css({display:"none"})}else{jQuery(e.filterGroupClass+".esg-navigationbutton,"+e.filterGroupClass+" .esg-navigationbutton").css({display:"inline-block"});v.css({display:"inline-block"})}if(e.currentpage>=Math.ceil(e.nonefiltereditems/r)){e.oldpage=e.currentpage;e.currentpage=0;var y=0;t.find(".itemtoshow, .fitsinfilter").each(function(){y++;if(y=i){var f=u/r[1],l=u/f,c=s/f,h=(c-r[0])/2;h=100/r[0]*h;e.css({position:"absolute",width:"auto",height:"101%",top:"0%",left:0-h+"%"})}else{var f=s/r[0],l=u/f,c=s/f,h=(l-r[1])/2;h=100/r[1]*h;e.css({position:"absolute",width:"101%",height:"auto",left:"0%",top:0-h+"%"})}removeLLCover(e)}}else{removeLLCover(e)}}function removeLLCover(e){if(!e.hasClass("coverremoved")&&e.parent().find(".lazyloadcover").length>0){e.addClass("coverremoved");punchgs.TweenLite.to(e.parent().find(".lazyloadcover"),.5,{autoAlpha:0,ease:punchgs.Power3.easeInOut,onComplete:function(){e.parent().find(".lazyloadcover").remove()}})}}function runGrid(e,t){var n=e.container;if(e.firstshowever==undefined){if(n.is(":hidden")){punchgs.TweenLite.set(n,{autoAlpha:1,display:"block"});setTimeout(function(){runGridMain(e,t);jQuery(e.filterGroupClass+".esg-navigationbutton, "+e.filterGroupClass+" .esg-navigationbutton").css({visibility:"visible"})},300)}else{runGridMain(e,t);jQuery(e.filterGroupClass+".esg-navigationbutton, "+e.filterGroupClass+" .esg-navigationbutton").css({visibility:"visible"})}e.firstshowever=1}else{runGridMain(e,t);jQuery(e.filterGroupClass+".esg-navigationbutton, "+e.filterGroupClass+" .esg-navigationbutton").css({visibility:"visible"})}}function getCobblePat(e,t){var n=new Object;n.w=1;n.h=1;e=e.split(",");if(e!=undefined){e=e[t-Math.floor(t/e.length)*e.length].split("x");n.w=e[0];n.h=e[1]}return n}function runGridMain(e,t){var n=e.container,r=n.find(".itemtoshow, .isvisiblenow").not(".ui-sortable-helper"),i=new Object,s=n.find("ul").first(),o=n.find(".esg-overflowtrick").first(),u=e.aspectratio,a,f=0;e.aspectratioOrig=e.aspectratio;n.find(".mainul").addClass("gridorganising");u=u.split(":");a=parseInt(u[0],0)/parseInt(u[1],0);i.item=0;i.pagetoanimate=0-e.currentpage;i.col=0;i.row=0;i.pagecounter=0;i.itemcounter=0;i.fakecol=0;i.fakerow=0;i.maxheight=0;i.allcol=0;i.allrow=0;i.ulcurheight=0;i.ulwidth=s.width();i.verticalsteps=1;i.currentcolumnheight=new Array;for(var l=0;l0)punchgs.TweenLite.set(r,{display:"block",visibility:"visible",overwrite:"auto"});else punchgs.TweenLite.set(r,{display:"block",width:i.itemw,height:i.itemh,visibility:"visible",overwrite:"auto"})}else{punchgs.TweenLite.set(r,{display:"block",width:i.itemw,height:"auto",visibility:"visible",overwrite:"auto"})}if(!t){punchgs.TweenLite.killTweensOf(r)}i.originalitemh=i.itemh;var m=new Array,g=e.row*e.column*2;for(var y=0;y2){var p=getCobblePat(e.cobblesPattern,E);u=parseInt(p.w,0);l=parseInt(p.h,0);E++}u=u==undefined?1:u;l=l==undefined?1:l;if(e.column=g)v=true}while(!v);break;case"1:2":do{if(m[y][b]==0&&y=g)v=true}while(!v);break;case"1:3":do{if(m[y][b]==0&&y=g)v=true}while(!v);break;case"2:1":do{if(m[y][b]==0&&b=g)v=true}while(!v);break;case"3:1":do{if(m[y][b]==0&&b=g)v=true}while(!v);break;case"2:2":do{if(b=g)v=true}while(!v);break;case"3:2":do{if(b=g)v=true}while(!v);break;case"2:3":do{if(b=g)v=true}while(!v);break;case"3:3":do{if(b=g)v=true}while(!v);break}e.aspectratio=i.itemw+":"+i.itemh;punchgs.TweenLite.set(o,{width:i.itemw,height:i.itemh,overwrite:"auto"});var w=o.find(".esg-entry-media").find("img");if(w.length>0){evenImageRatio(w,e,true)}}else{var S=i.row-h*Math.floor(i.row/h);if(e.layout=="even"&&h>0){e.column=c[S][e.columnindex];i.cwidth=n.find(".esg-overflowtrick").width()-e.overflowoffset*2;i.cwidth_n_spaces=i.cwidth-(e.column-1)*e.space;i.itemw=Math.round(i.cwidth_n_spaces/e.column);i.itemh=f==0?i.cwidth_n_spaces/e.column/a:f/e.row;e.aspectratio=f==0?e.aspectratio:i.itemw+":"+i.itemh;punchgs.TweenLite.set(o,{width:i.itemw,height:i.itemh,overwrite:"auto"})}}if(e.layout=="even"){var w=o.find(".esg-entry-media").find("img");if(w.length>0)evenImageRatio(w,e,true)}else{if(o.hasClass("itemtoshow"))if(o.width()!=i.itemw||o.css("opacity")==0||o.css("visibility")=="hidden")i=prepareItemToMessure(o,i,n);else{adjustMediaSize(o,true,i,e);i.itemh=o.height()}else{adjustMediaSize(o,true,i,e);i.itemh=o.height()}}i=animateGrid(r,e,i);i.itemcounter++;if(s.height()0)punchgs.TweenLite.to(x,.2,{autoAlpha:0})}function prepareItemToMessure(e,t,n){adjustMediaSize(e,true,t,n.data("opt"));t.itemh=e.outerHeight(true);return t}function animateGrid(e,t,n){var r=jQuery(e),i=["fade","scale","vertical-flip","horizontal-flip","vertical-flipbook","horizontal-flipbook","fall","rotatefall","rotatescale","stack"],s=["horizontal-slide","horizontal-harmonica"],o=["vertical-slide","vertical-harmonica"];n.skipanim=false;n.x=Math.round(n.col*n.itemw);if(t.layout=="even"){}else{n.idealcol=0;n.backupcol=n.col;for(var u=0;un.currentcolumnheight[u])n.idealcol=u;n.y=n.currentcolumnheight[n.idealcol];n.x=Math.round(n.idealcol*n.itemw)+n.idealcol*t.space;n.col=n.idealcol;if(n.itemh==undefined)n.itemh=0}if(n.cobblesx!=undefined){n.x=n.cobblesx*n.cobblesorigw;n.y=n.cobblesy*n.cobblesorigh}n.waits=n.col*n.delaybasic+n.row*n.delaybasic*t.column;n.speed=t.animSpeed;n.inxrot=0;n.inyrot=0;n.outxrot=0;n.outyrot=0;n.inorigin="center center";n.outorigin="center center";n.itemh=Math.round(n.itemh);n.scale=1;n.outfade=0;n.infade=0;if(r.hasClass("itemonotherpage"))n.skipanim=true;if(n.anim=="horizontal-slide"){n.waits=0;n.hsoffset=0-n.cwidth-parseInt(t.space);n.hsoffsetout=0-n.cwidth-parseInt(t.space);if(t.oldpage!=undefined&&t.oldpage>t.currentpage){n.hsoffset=n.cwidth+parseInt(t.space);n.hsoffsetout=n.cwidth+parseInt(t.space)}}else if(n.anim=="vertical-slide"){n.waits=0;n.maxcalcheight=t.row*t.space+t.row*n.itemh;n.vsoffset=n.maxcalcheight+parseInt(t.space);n.vsoffsetout=n.maxcalcheight+parseInt(t.space);if(t.oldpage!=undefined&&t.oldpage>t.currentpage){n.vsoffset=0-n.maxcalcheight-parseInt(t.space);n.vsoffsetout=0-n.maxcalcheight-parseInt(t.space)}}n.outwaits=n.waits;if(t.layout=="even"&&n.cobblesx==undefined){n.x=n.x+n.col*t.space}if(n.cobblesx!=undefined){n.x=n.x+n.cobblesx*t.space;n.y=n.y+n.cobblesy*t.space}if(n.anim=="vertical-flip"||n.anim=="horizontal-flip"||n.anim=="vertical-flipbook"||n.anim=="horizontal-flipbook")n=fakePositions(r,n,t);if(n.anim=="vertical-flip"){n.inxrot=-180;n.outxrot=180}else if(n.anim=="horizontal-flip"){n.inyrot=-180;n.outyrot=180}n.outspeed=n.speed;if(t.animDelay=="off"){n.waits=0;n.outwaits=0}if(n.anim=="scale"){n.scale=0}else if(n.anim=="vertical-flipbook"){n.inxrot=-90;n.outxrot=90;n.inorigin="center top";n.outorigin="center bottom";n.waits=n.waits+n.speed/3;n.outfade=1;n.infade=1;n.outspeed=n.speed/1.2;n.ease="Sine.easeOut";n.easeout="Sine.easeIn";if(t.animDelay=="off"){n.waits=n.speed/3;n.outwaits=0}}else if(n.anim=="horizontal-flipbook"){n.inyrot=-90;n.outyrot=-90;n.inorigin="left center";n.outorigin="right center";n.waits=n.waits+n.speed/2.4;n.outfade=1;n.infade=1;n.outspeed=n.speed/1.2;n.ease="Sine.easeOut";n.easeout="Sine.easeIn";if(t.animDelay=="off"){n.waits=n.speed/3;n.outwaits=0}}else if(n.anim=="fall"||n.anim=="rotatefall"){n.outoffsety=100;n=fakePositions(r,n,t);n.outfade=0}if(n.anim=="rotatefall"){n.rotatez=20;n.outorigin="left top";n.outfade=1;n.outoffsety=600}else if(n.anim=="rotatescale"){n.scale=0;n.inorigin="left bottom";n.outorigin="center center";n.faeout=1;n.outoffsety=100;n=fakePositions(r,n,t)}else if(n.anim=="stack"){n.scale=0;n.inorigin="center center";n.faeout=1;n.ease="punchgs.Power3.easeOut";n=fakePositions(r,n,t);n.ease="Back.easeOut"}if(t.silent){n.waits=0;n.outwaits=0;n.speed=0;n.outspeed=0}if(t.silentout){n.outwaits=0;n.outspeed=.4;n.speed=.4;n.ease="punchgs.Power3.easeOut";n.easeout=n.ease}n.hooffset=t.overflowoffset;n.vooffset=t.overflowoffset;if(n.itemw+n.x-n.cwidth<20&&n.itemw+n.x-n.cwidth>-20){var a=n.itemw+n.x-n.cwidth;n.itemw=n.itemw-a}if((r.hasClass("itemtoshow")||r.hasClass("fitsinfilter"))&&!n.skipanim){r.addClass("isvisiblenow");if(t.layout!="even"){n.currentcolumnheight[n.idealcol]=n.currentcolumnheight[n.idealcol]+n.itemh+parseInt(t.space);if(n.ulcurheight0){r.find("iframe").each(function(){var e=jQuery(this);var n=Math.round(e.data("neww"));var i=Math.round(e.data("newh"));if(t.layout!="even"){punchgs.TweenLite.set(r.find(".esg-media-poster"),{width:n,height:i});punchgs.TweenLite.set(r.find("iframe"),{width:n,height:i})}else{punchgs.TweenLite.set(r.find(".esg-media-poster"),{width:"100%",height:"100%"});punchgs.TweenLite.set(r.find("iframe"),{width:"100%",height:"100%"})}})}if(r.find(".video-eg").length>0){r.find(".video-eg").each(function(){var e=jQuery(this);var n=e.data("neww");var i=e.data("newh");if(t.layout!="even"){punchgs.TweenLite.set(r.find(".esg-media-poster"),{width:n,height:i});punchgs.TweenLite.set(r.find(".esg-entry-media"),{width:n,height:i});punchgs.TweenLite.set(r.find(".video-eg"),{width:n,height:i})}else{punchgs.TweenLite.set(r.find(".esg-media-poster"),{width:"100%",height:"100%"});punchgs.TweenLite.set(r.find(".esg-entry-media"),{width:"100%",height:"100%"});punchgs.TweenLite.set(r.find(".video-eg"),{width:"100%",height:"100%"})}})}if(t.layout=="masonry")n.col=n.backupcol;n=shiftGrid(n,t,r)}else{n.itemouttowait++;punchgs.TweenLite.set(r,{zIndex:5});r.removeClass("isvisiblenow");if(r.css("opacity")>0){if(n.anim=="stack"){punchgs.TweenLite.set(r,{zIndex:n.pageitemcounterfake+100});punchgs.TweenLite.to(r,n.outspeed/2,{force3D:"auto",x:-20-n.itemw,rotationY:30,rotationX:10,ease:Sine.easeInOut,delay:n.outwaits});punchgs.TweenLite.to(r,.01,{force3D:"auto",zIndex:n.pageitemcounterfake,delay:n.outwaits+n.outspeed/3});punchgs.TweenLite.to(r,n.outspeed*.2,{force3D:"auto",delay:n.outwaits+n.outspeed*.9,autoAlpha:0,ease:Sine.easeInOut});punchgs.TweenLite.to(r,n.outspeed/3,{zIndex:2,force3D:"auto",x:0,scale:.9,rotationY:0,rotationX:0,ease:Sine.easeInOut,delay:n.outwaits+n.outspeed/1.4,onComplete:function(){if(!r.hasClass("itemtoshow"))punchgs.TweenLite.set(r,{autoAlpha:0,overwrite:"all",display:"none"});n.itemouttowait--;if(n.itemouttowait==0){t.container.trigger("itemsinposition")}}});}else if(n.anim=="horizontal-flipbook"||n.anim=="vertical-flipbook"){punchgs.TweenLite.to(r,n.outspeed,{force3D:"auto",zIndex:2,scale:n.scale,autoAlpha:n.outfade,transformOrigin:n.outorigin,rotationX:n.outxrot,rotationY:n.outyrot,ease:n.easeout,delay:n.outwaits,onComplete:function(){if(!r.hasClass("itemtoshow"))punchgs.TweenLite.set(r,{autoAlpha:0,overwrite:"all",display:"none"});n.itemouttowait--;if(n.itemouttowait==0){t.container.trigger("itemsinposition")}}})}else if(n.anim=="fall")punchgs.TweenLite.to(r,n.outspeed,{zIndex:2,force3D:"auto",y:n.outoffsety,autoAlpha:0,ease:n.easeout,delay:n.outwaits,onComplete:function(){if(!r.hasClass("itemtoshow"))punchgs.TweenLite.set(r,{autoAlpha:0,overwrite:"all",display:"none"});n.itemouttowait--;if(n.itemouttowait==0){t.container.trigger("itemsinposition")}}});else if(n.anim=="horizontal-slide")punchgs.TweenLite.to(r,n.outspeed,{zIndex:2,force3D:"auto",autoAlpha:1,left:n.hooffset+r.position().left+n.hsoffsetout,top:n.vooffset+r.position().top,ease:n.easeout,delay:n.outwaits,onComplete:function(){punchgs.TweenLite.set(r,{autoAlpha:0,overwrite:"all",display:"none"});n.itemouttowait--;if(n.itemouttowait==0){t.container.trigger("itemsinposition")}}});else if(n.anim=="vertical-slide")punchgs.TweenLite.to(r,n.outspeed,{zIndex:2,force3D:"auto",autoAlpha:1,left:n.hooffset+r.position().left,top:n.vooffset+r.position().top+n.vsoffsetout,ease:n.easeout,delay:n.outwaits,onComplete:function(){punchgs.TweenLite.set(r,{autoAlpha:0,overwrite:"all",display:"none"});n.itemouttowait--;if(n.itemouttowait==0){t.container.trigger("itemsinposition")}}});else if(n.anim=="rotatefall"&&r.css("opacity")>0){punchgs.TweenLite.set(r,{zIndex:300-n.item});punchgs.TweenLite.to(r,n.outspeed/2,{force3D:"auto",transformOrigin:n.outorigin,ease:"punchgs.Bounce.easeOut",rotationZ:n.rotatez,delay:n.outwaits});punchgs.TweenLite.to(r,n.outspeed/2,{zIndex:2,force3D:"auto",autoAlpha:0,y:n.outoffsety,ease:punchgs.Power3.easeIn,delay:n.outwaits+n.outspeed/3})}else punchgs.TweenLite.to(r,n.outspeed,{force3D:"auto",zIndex:2,scale:n.scale,autoAlpha:n.outfade,transformOrigin:n.outorigin,rotationX:n.outxrot,rotationY:n.outyrot,ease:n.easeout,delay:n.outwaits,onComplete:function(){if(!r.hasClass("itemtoshow"))punchgs.TweenLite.set(r,{autoAlpha:0,overwrite:"all",display:"none"});n.itemouttowait--;if(n.itemouttowait==0){t.container.trigger("itemsinposition")}}})}else{punchgs.TweenLite.set(r,{zIndex:2,scale:n.scale,autoAlpha:0,transformOrigin:n.outorigin,rotationX:n.outxrot,rotationY:n.outyrot,onComplete:function(){if(!r.hasClass("itemtoshow"))punchgs.TweenLite.set(r,{autoAlpha:0,overwrite:"all",display:"none"});n.itemouttowait--;if(n.itemouttowait==0){t.container.trigger("itemsinposition")}}})}n=shiftGridFake(n,t)}return n}function fakePositions(e,t,n){if((e.hasClass("itemtoshow")||e.hasClass("fitsinfilter"))&&!t.skipanim){}else{var r=e.data("col");var i=e.data("row");if(r==undefined||i==undefined){if(t.x!=0&&t.y!=0){t.x=Math.round(t.fakecol*t.itemw);t.y=t.fakey;r=t.fakecol;i=t.fakerow;e.data("col",t.fakecol);e.data("row",t.fakerow)}}if(t.anim=="rotatefall"){t.outwaits=(n.column-r)*t.delaybasic+i*t.delaybasic*n.column}else{t.outwaits=r*t.delaybasic+i*t.delaybasic*n.column}}return t}function shiftGrid(e,t,n){n.data("col",e.col);n.data("row",e.row);e.pageitemcounter++;e.col=e.col+e.verticalsteps;e.allcol++;if(e.col==t.column){e.col=0;e.row++;e.allrow++;e.y=parseFloat(e.y)+parseFloat(e.itemh)+parseFloat(t.space);if(e.row==t.row){e.row=0;if(e.pageitemcounter>=t.column*t.row)e.pageitemcounter=0;e.pagetoanimate=e.pagetoanimate+1;e.pagecounter++;if(e.pageitemcounter==0)for(var r=0;r0&&n==0){n=1;var t=document.createElement("script");var r="https";t.src=r+"://www.youtube.com/iframe_api";var i=document.getElementsByTagName("script")[0];var s=true;jQuery("head").find("*").each(function(){if(jQuery(this).attr("src")==r+"://www.youtube.com/iframe_api")s=false});if(s){i.parentNode.insertBefore(t,i)}}}catch(o){}});e.find("iframe").each(function(e){try{if(jQuery(this).attr("src").indexOf("vim")>0&&r==0){r=1;var t=document.createElement("script");t.src=o+"://a.vimeocdn.com/js/froogaloop2.min.js";var n=document.getElementsByTagName("script")[0];var i=true;jQuery("head").find("*").each(function(){if(jQuery(this).attr("src")==o+"://a.vimeocdn.com/js/froogaloop2.min.js")i=false});if(i)n.parentNode.insertBefore(t,n)}}catch(s){}});e.find("iframe").each(function(e){try{if(jQuery(this).attr("src").indexOf("soundcloud")>0&&s==0){s=1;var t=document.createElement("script");t.src=o+"://w.soundcloud.com/player/api.js";var n=document.getElementsByTagName("script")[0];var r=true;jQuery("head").find("*").each(function(){if(jQuery(this).attr("src")==o+"://w.soundcloud.com/player/api.js")r=false});if(r)n.parentNode.insertBefore(t,n)}}catch(i){}});var u={youtube:n,vimeo:r,soundcloud:s,htmlvid:i};return u}function toHHMMSS(){var e=new Date;var t=Math.floor(e)/1e3;var n=Math.floor(t/60);var r=Math.floor(n/60);var i=Math.floor(r/24);var r=r-i*24;var n=n-i*24*60-r*60;var t=t-i*24*60*60-r*60*60-n*60;return r+":"+n+":"+t}function stopAllVideos(e,t,n){var r=".isplaying";if(e)r="";jQuery(".esg-youtubevideo.haslistener"+r).each(function(t){var r=jQuery(this);var i=r.data("player");if(n!=r.attr("id")){i.pauseVideo();if(e)forceVideoInPause(r,true,i,"youtube")}});jQuery(".esg-vimeovideo.haslistener"+r).each(function(t){var r=jQuery(this);var i=r.attr("id");var s=$f(i);if(n!=i){s.api("pause");if(e)forceVideoInPause(r,true,s,"vimeo")}});jQuery(".esg-htmlvideo.haslistener"+r).each(function(t){var r=jQuery(this);var i=r.attr("id");var s=document.getElementById(i);if(n!=i){s.pause();if(e)forceVideoInPause(r,true,s,"html5vid")}});jQuery(".esg-soundcloud"+r).each(function(t){var r=jQuery(this);var i=r.data("player");if(n!=r.attr("id")){i.pause();if(e)forceVideoInPause(r,true,i,"soundcloud")}})}function forceVideoInPause(e,t,n,r){e.removeClass("isplaying");var i=e.closest(".tp-esg-item");if(i.find(".esg-media-video").length>0&&!jQuery("body").data("fullScreenMode")){var s=i.find(".esg-entry-cover");var o=i.find(".esg-media-poster");if(o.length>0){if(!is_mobile()){punchgs.TweenLite.to(s,.5,{autoAlpha:1});punchgs.TweenLite.to(o,.5,{autoAlpha:1});punchgs.TweenLite.to(e,.5,{autoAlpha:0})}else{punchgs.TweenLite.set(s,{autoAlpha:1});punchgs.TweenLite.set(o,{autoAlpha:1});punchgs.TweenLite.set(e,{autoAlpha:0})}if(t){if(r=="youtube")try{n.destroy()}catch(u){}else if(r=="vimeo")try{n.api("unload")}catch(u){}else if(r!="html5vid"){e.removeClass("haslistener");e.removeClass("readytoplay")}}else{setTimeout(function(){if(!is_mobile())e.css({display:"none"})},500)}}}}function onPlayerStateChange(e){var t=e.target.getVideoEmbedCode();var n=jQuery("#"+t.split('id="')[1].split('"')[0]);var r=n.data("player");if(e.data==YT.PlayerState.PLAYING){r.setPlaybackQuality("hd1080");stopAllVideos(true,false,n.attr("id"));n.addClass("isplaying");n.removeClass("isinpause")}if(e.data==2){forceVideoInPause(n)}if(e.data==0){forceVideoInPause(n)}}function vimeoready_auto(e){var t=$f(e);var n=jQuery("#"+e);t.addEvent("ready",function(r){n.addClass("readytoplay");t.addEvent("play",function(t){stopAllVideos(true,false,e);n.addClass("isplaying");n.removeClass("isinpause")});t.addEvent("finish",function(e){forceVideoInPause(n);n.removeClass("isplaying")});t.addEvent("pause",function(e){forceVideoInPause(n);n.removeClass("isplaying")})})}function addEvent(e,t,n){if(e.addEventListener)e.addEventListener(t,n,false);else e.attachEvent(t,n,false)}function html5vidready(e,t,n){t.addClass("readytoplay");t.on("play",function(){stopAllVideos(true,false,n);t.addClass("isplaying");t.removeClass("isinpause")});t.on("pause",function(){forceVideoInPause(t);t.removeClass("isplaying")});t.on("ended",function(){forceVideoInPause(t);t.removeClass("isplaying")})}function prepareYT(e){var t="ytiframe"+Math.round(Math.random()*1e5+1);if(!e.hasClass("haslistener")&&typeof YT!="undefined"){try{e.attr("id",t);var n=new YT.Player(t,{events:{onStateChange:onPlayerStateChange}});e.data("player",n);e.addClass("haslistener").addClass("esg-youtubevideo")}catch(r){return false}}else{var n=e.data("player");if(n!=undefined)if(typeof n.playVideo=="function")return true;else return false;else return false}}function playYT(e){var t=e.data("player");if(t!=undefined)if(typeof t.playVideo=="function")t.playVideo()}function prepareVimeo(e){if(!e.hasClass("haslistener")&&typeof $f!="undefined"){try{var t="vimeoiframe"+Math.round(Math.random()*1e5+1);e.attr("id",t);var n=e.attr("src");var r={},i=n,s=/([^&=]+)=([^&]*)/g,o;while(o=s.exec(i)){r[decodeURIComponent(o[1])]=decodeURIComponent(o[2])}if(r["player_id"]!=undefined)n=n.replace(r["player_id"],t);else n=n+"&player_id="+t;try{n=n.replace("api=0","api=1")}catch(u){}n=n+"&api=1";e.attr("src",n);var a=e[0];$f(a).addEvent("ready",function(){vimeoready_auto(t)});e.addClass("haslistener").addClass("esg-vimeovideo")}catch(u){return false}}else{if(typeof $f!=undefined&&typeof $f!="undefined"){var f=$f(e.attr("id"));if(typeof f.api=="function"&&e.hasClass("readytoplay"))return true;else return false}else{return false}}}function playVimeo(e){var t=$f(e.attr("id"));t.api("play")}function prepareSoundCloud(e){if(e.data("player")==undefined&&typeof SC!="undefined"){var t="sciframe"+Math.round(Math.random()*1e5+1);try{e.attr("id",t);var n=SC.Widget(t);n.bind(SC.Widget.Events.PLAY,function(){stopAllVideos(true,false,e.attr("id"));e.addClass("isplaying");e.removeClass("isinpause")});n.bind(SC.Widget.Events.PAUSE,function(){forceVideoInPause(e);e.removeClass("isplaying")});n.bind(SC.Widget.Events.FINISH,function(){forceVideoInPause(e);e.removeClass("isplaying")});e.data("player",n);e.addClass("haslistener").addClass("esg-soundcloud")}catch(r){return false}}else{var n=e.data("player");if(n!=undefined){if(typeof n.getVolume=="function"){return true}else{return false}}else return false}}function playSC(e){var t=e.data("player");if(t!=undefined){if(typeof t.getVolume=="function"){setTimeout(function(){t.play()},500)}}}function prepareVideo(e){if(!e.hasClass("haslistener")){var t="videoid_"+Math.round(Math.random()*1e5+1);e.attr("id",t);var n=document.getElementById(t);n.oncanplay=html5vidready(n,e,t);e.addClass("haslistener").addClass("esg-htmlvideo")}else{try{var r=e.attr("id");var n=document.getElementById(r);if(typeof n.play=="function"&&e.hasClass("readytoplay"))return true;else return false}catch(i){return false}}}function playVideo(e){var t=e.attr("id");var n=document.getElementById(t);n.play()}var esgAnimmatrix=[[".esg-none",0,{autoAlpha:1,rotationZ:0,x:0,y:0,scale:1,rotationX:0,rotationY:0,skewX:0,skewY:0},{autoAlpha:1,ease:punchgs.Power2.easeOut,overwrite:"all"},0,{autoAlpha:1,overwrite:"all"}],[".esg-fade",.3,{autoAlpha:0,rotationZ:0,x:0,y:0,scale:1,rotationX:0,rotationY:0,skewX:0,skewY:0},{autoAlpha:1,ease:punchgs.Power2.easeOut,overwrite:"all"},.3,{autoAlpha:0,ease:punchgs.Power2.easeOut,overwrite:"all"}],[".esg-fadeout",.3,{autoAlpha:1,ease:punchgs.Power2.easeOut,overwrite:"all"},{autoAlpha:0,rotationZ:0,x:0,y:0,scale:1,rotationX:0,rotationY:0,skewX:0,skewY:0},.3,{autoAlpha:1,rotationZ:0,x:0,y:0,scale:1,rotationX:0,rotationY:0,skewX:0,skewY:0,ease:punchgs.Power2.easeOut,overwrite:"all"}],[".esg-covergrowup",.3,{autoAlpha:1,top:"100%",marginTop:-10,rotationZ:0,x:0,y:0,scale:1,rotationX:0,rotationY:0,skewX:0,skewY:0},{autoAlpha:1,top:"0%",marginTop:0,ease:punchgs.Power2.easeOut,overwrite:"all"},.3,{autoAlpha:1,top:"100%",marginTop:-10,bottom:0,z:0,ease:punchgs.Power2.easeOut,overwrite:"all"},true],[".esg-flipvertical",.5,{x:0,y:0,scale:1,rotationZ:0,rotationX:0,rotationY:0,skewX:0,skewY:0,rotationX:180,autoAlpha:0,z:-.001,transformOrigin:"50% 50%"},{rotationX:0,autoAlpha:1,scale:1,z:.001,ease:punchgs.Power3.easeInOut,overwrite:"all"},.5,{rotationX:180,autoAlpha:0,scale:1,z:-.001,ease:punchgs.Power3.easeInOut,overwrite:"all"},true],[".esg-flipverticalout",.5,{x:0,y:0,scale:1,rotationZ:0,rotationX:0,rotationY:0,skewX:0,skewY:0,rotationX:0,autoAlpha:1,z:.001,transformOrigin:"50% 50%"},{rotationX:-180,scale:1,autoAlpha:0,z:-150,ease:punchgs.Power3.easeInOut,overwrite:"all"},.5,{rotationX:0,autoAlpha:1,scale:1,z:0,ease:punchgs.Power3.easeInOut,overwrite:"all"}],[".esg-fliphorizontal",.5,{x:0,y:0,scale:1,rotationZ:0,rotationX:0,rotationY:0,skewX:0,skewY:0,rotationY:180,autoAlpha:0,z:-.001,transformOrigin:"50% 50%"},{rotationY:0,autoAlpha:1,scale:1,z:.001,ease:punchgs.Power3.easeInOut,overwrite:"all"},.5,{rotationY:180,autoAlpha:0,scale:1,z:-.001,ease:punchgs.Power3.easeInOut,overwrite:"all"},true],[".esg-fliphorizontalout",.5,{x:0,y:0,scale:1,rotationZ:0,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:1,z:.001,transformOrigin:"50% 50%"},{rotationY:-180,scale:1,autoAlpha:0,z:-150,ease:punchgs.Power3.easeInOut,overwrite:"all"},.5,{rotationY:0,autoAlpha:1,scale:1,z:.001,ease:punchgs.Power3.easeInOut,overwrite:"all"}],[".esg-flipup",.5,{x:0,y:0,scale:.8,rotationZ:0,rotationX:90,rotationY:0,skewX:0,skewY:0,autoAlpha:0,z:.001,transformOrigin:"50% 100%"},{scale:1,rotationX:0,autoAlpha:1,z:.001,ease:punchgs.Power2.easeOut,overwrite:"all"},.3,{scale:.8,rotationX:90,autoAlpha:0,z:.001,ease:punchgs.Power2.easeOut,overwrite:"all"},true],[".esg-flipupout",.5,{rotationX:0,autoAlpha:1,y:0,ease:punchgs.Bounce.easeOut,overwrite:"all"},{x:0,y:0,scale:1,rotationZ:0,rotationX:-90,rotationY:0,skewX:0,skewY:0,autoAlpha:1,z:.001,transformOrigin:"50% 0%"},.3,{rotationX:0,autoAlpha:1,y:0,ease:punchgs.Bounce.easeOut,overwrite:"all"}],[".esg-flipdown",.5,{x:0,y:0,scale:1,rotationZ:0,rotationX:-90,rotationY:0,skewX:0,skewY:0,autoAlpha:0,z:.001,transformOrigin:"50% 0%"},{rotationX:0,autoAlpha:1,y:0,ease:punchgs.Bounce.easeOut,overwrite:"all"},.3,{rotationX:-90,z:0,ease:punchgs.Power2.easeOut,autoAlpha:0,overwrite:"all"},true],[".esg-flipdownout",.5,{scale:1,rotationX:0,autoAlpha:1,z:.001,ease:punchgs.Power2.easeOut,overwrite:"all"},{x:0,y:0,scale:.8,rotationZ:0,rotationX:90,rotationY:0,skewX:0,skewY:0,autoAlpha:0,z:.001,transformOrigin:"50% 100%"},.3,{scale:1,rotationX:0,autoAlpha:1,z:.001,ease:punchgs.Power2.easeOut,overwrite:"all"}],[".esg-flipright",.5,{x:0,y:0,scale:.8,rotationZ:0,rotationX:0,rotationY:90,skewX:0,skewY:0,autoAlpha:0,transformOrigin:"0% 50%"},{scale:1,rotationY:0,autoAlpha:1,ease:punchgs.Power2.easeOut,overwrite:"all"},.3,{autoAlpha:0,scale:.8,rotationY:90,ease:punchgs.Power3.easeOut,overwrite:"all"},true],[".esg-fliprightout",.5,{x:0,y:0,scale:1,rotationZ:0,rotationX:0,rotationY:0,skewX:0,skewY:0,rotationY:0,autoAlpha:1,transformOrigin:"100% 50%"},{scale:1,rotationY:-90,autoAlpha:0,ease:punchgs.Power2.easeOut,overwrite:"all"},.3,{scale:1,z:0,rotationY:0,autoAlpha:1,ease:punchgs.Power3.easeOut,overwrite:"all"}],[".esg-flipleft",.5,{x:0,y:0,scale:1,rotationZ:0,rotationX:0,rotationY:-90,skewX:0,skewY:0,autoAlpha:1,transformOrigin:"100% 50%"},{rotationY:0,autoAlpha:1,z:.001,scale:1,ease:punchgs.Power3.easeOut,overwrite:"all"},.3,{autoAlpha:0,rotationY:-90,z:0,ease:punchgs.Power2.easeOut,overwrite:"all"},true],[".esg-flipleftout",.5,{x:0,y:0,scale:1,rotationZ:0,rotationX:0,rotationY:0,skewX:0,skewY:0,rotationY:0,autoAlpha:1,transformOrigin:"0% 50%"},{scale:1,rotationY:90,autoAlpha:0,ease:punchgs.Power2.easeOut,overwrite:"all"},.3,{scale:1,z:0,rotationY:0,autoAlpha:1,ease:punchgs.Power3.easeOut,overwrite:"all"}],[".esg-turn",.5,{x:50,y:0,scale:0,rotationZ:0,rotationX:0,rotationY:-40,skewX:0,skewY:0,autoAlpha:1,transformOrigin:"50% 50%"},{scale:1,x:0,rotationY:0,autoAlpha:1,ease:punchgs.Power3.easeInOut,overwrite:"all"},.3,{scale:0,rotationY:-40,autoAlpha:1,z:0,x:50,ease:punchgs.Power3.easeInOut,overwrite:"all"},true],[".esg-turnout",.5,{x:0,y:0,scale:1,rotationZ:0,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:1,transformOrigin:"50% 50%"},{scale:1,rotationY:40,scale:.6,autoAlpha:0,x:-50,ease:punchgs.Power3.easeInOut,overwrite:"all"},.3,{scale:1,rotationY:0,z:0,autoAlpha:1,x:0,rotationX:0,rotationZ:0,ease:punchgs.Power3.easeInOut,overwrite:"all"}],[".esg-slide",.5,{x:-1e4,y:0,scale:1,rotationZ:0,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:1,transformOrigin:"50% 50%"},{autoAlpha:1,x:0,y:0,ease:punchgs.Power3.easeOut,overwrite:"all"},.3,{autoAlpha:1,x:-1e4,y:0,z:0,ease:punchgs.Power2.easeOut,overwrite:"all"}],[".esg-slideout",.5,{x:0,y:0,scale:1,rotationZ:0,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:1,transformOrigin:"50% 50%"},{autoAlpha:1,x:0,y:0,ease:punchgs.Power3.easeOut,overwrite:"all"},.3,{autoAlpha:1,x:0,y:0,z:0,ease:punchgs.Power2.easeOut,overwrite:"all"}],[".esg-slideright",.5,{xPercent:-50,y:0,scale:1,rotationZ:0,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:0,transformOrigin:"50% 50%"},{autoAlpha:1,xPercent:0,ease:punchgs.Power3.easeOut,overwrite:"all"},.3,{autoAlpha:0,xPercent:-50,z:0,ease:punchgs.Power2.easeOut,overwrite:"all"}],[".esg-sliderightout",.5,{autoAlpha:1,xPercent:0,ease:punchgs.Power3.easeOut,overwrite:"all"},{xPercent:50,y:0,scale:1,rotationZ:0,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:0,transformOrigin:"50% 50%"},.3,{autoAlpha:1,xPercent:0,ease:punchgs.Power3.easeOut,overwrite:"all"}],[".esg-scaleleft",.5,{x:0,y:0,scaleX:0,rotationZ:0,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:1,transformOrigin:"100% 50%"},{autoAlpha:1,x:0,scaleX:1,ease:punchgs.Power3.easeOut,overwrite:"all"},.3,{autoAlpha:1,x:0,z:0,scaleX:0,ease:punchgs.Power2.easeOut,overwrite:"all"}],[".esg-scaleright",.5,{x:0,y:0,scaleX:0,rotationZ:0,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:1,transformOrigin:"0% 50%"},{autoAlpha:1,x:0,scaleX:1,ease:punchgs.Power3.easeOut,overwrite:"all"},.3,{autoAlpha:1,x:0,z:0,scaleX:0,ease:punchgs.Power2.easeOut,overwrite:"all"}],[".esg-slideleft",.5,{xPercent:50,y:0,scale:1,rotationZ:0,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:0,transformOrigin:"50% 50%"},{autoAlpha:1,xPercent:0,ease:punchgs.Power3.easeOut,overwrite:"all"},.3,{autoAlpha:0,xPercent:50,z:0,ease:punchgs.Power2.easeOut,overwrite:"all"}],[".esg-slideleftout",.5,{autoAlpha:1,xPercent:0,ease:punchgs.Power3.easeOut,overwrite:"all"},{xPercent:-50,y:0,scale:1,rotationZ:0,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:0,transformOrigin:"50% 50%"},.3,{autoAlpha:1,xPercent:0,ease:punchgs.Power3.easeOut,overwrite:"all"}],[".esg-slideup",.5,{x:0,yPercent:50,scale:1,rotationZ:0,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:0,transformOrigin:"50% 50%"},{autoAlpha:1,yPercent:0,ease:punchgs.Power3.easeOut,overwrite:"all"},.3,{autoAlpha:0,yPercent:50,z:0,ease:punchgs.Power2.easeOut,overwrite:"all"}],[".esg-slideupout",.5,{autoAlpha:1,yPercent:0,ease:punchgs.Power3.easeOut,overwrite:"all"},{x:0,yPercent:-50,scale:1,rotationZ:0,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:0,transformOrigin:"50% 50%"},.3,{autoAlpha:1,yPercent:0,ease:punchgs.Power3.easeOut,overwrite:"all"}],[".esg-slidedown",.5,{x:0,yPercent:-50,scale:1,rotationZ:0,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:0,transformOrigin:"50% 50%"},{autoAlpha:1,yPercent:0,ease:punchgs.Power3.easeOut,overwrite:"all"},.3,{autoAlpha:0,yPercent:-50,z:0,ease:punchgs.Power2.easeOut,overwrite:"all"}],[".esg-slidedownout",.5,{autoAlpha:1,yPercent:0,z:0,ease:punchgs.Power3.easeOut,overwrite:"all"},{x:0,yPercent:50,scale:1,rotationZ:0,rotationX:0,z:10,rotationY:0,skewX:0,skewY:0,autoAlpha:0,transformOrigin:"50% 50%"},.3,{autoAlpha:1,yPercent:0,z:0,ease:punchgs.Power3.easeOut,overwrite:"all"}],[".esg-slideshortright",.5,{x:-30,y:0,scale:1,rotationZ:0,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:0,transformOrigin:"50% 50%"},{autoAlpha:1,x:0,ease:punchgs.Power3.easeOut,overwrite:"all"},.3,{autoAlpha:0,x:-30,z:0,ease:punchgs.Power2.easeOut,overwrite:"all"}],[".esg-slideshortrightout",.5,{autoAlpha:1,x:0,ease:punchgs.Power3.easeOut,overwrite:"all"},{x:30,y:0,scale:1,rotationZ:0,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:0,transformOrigin:"50% 50%"},.3,{autoAlpha:1,x:30,ease:punchgs.Power3.easeOut,overwrite:"all"}],[".esg-slideshortleft",.5,{x:30,y:0,scale:1,rotationZ:0,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:0,transformOrigin:"50% 50%"},{autoAlpha:1,x:0,ease:punchgs.Power3.easeOut,overwrite:"all"},.3,{autoAlpha:0,x:30,z:0,ease:punchgs.Power2.easeOut,overwrite:"all"}],[".esg-slideshortleftout",.5,{autoAlpha:1,x:0,ease:punchgs.Power3.easeOut,overwrite:"all"},{x:-30,y:0,scale:1,rotationZ:0,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:0,transformOrigin:"50% 50%"},.3,{autoAlpha:1,x:0,ease:punchgs.Power3.easeOut,overwrite:"all"}],[".esg-slideshortup",.5,{x:0,y:30,scale:1,rotationZ:0,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:0,transformOrigin:"50% 50%"},{autoAlpha:1,y:0,ease:punchgs.Power3.easeOut,overwrite:"all"},.3,{autoAlpha:0,y:30,z:0,ease:punchgs.Power2.easeOut,overwrite:"all"}],[".esg-slideshortupout",.5,{autoAlpha:1,y:0,ease:punchgs.Power3.easeOut,overwrite:"all"},{x:0,y:-30,scale:1,rotationZ:0,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:0,transformOrigin:"50% 50%"},.3,{autoAlpha:1,y:0,ease:punchgs.Power3.easeOut,overwrite:"all"}],[".esg-slideshortdown",.5,{x:0,y:-30,scale:1,rotationZ:0,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:0,transformOrigin:"50% 50%"},{autoAlpha:1,y:0,ease:punchgs.Power3.easeOut,overwrite:"all"},.3,{autoAlpha:0,y:-30,z:0,ease:punchgs.Power2.easeOut,overwrite:"all"}],[".esg-slideshortdownout",.5,{autoAlpha:1,y:0,ease:punchgs.Power3.easeOut,overwrite:"all"},{x:0,y:30,scale:1,rotationZ:0,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:0,transformOrigin:"50% 50%"},.3,{autoAlpha:1,y:0,ease:punchgs.Power3.easeOut,overwrite:"all"}],[".esg-skewright",.5,{xPercent:-100,y:0,scale:1,rotationZ:0,rotationX:0,rotationY:0,skewX:60,skewY:0,autoAlpha:0,transformOrigin:"50% 50%"},{autoAlpha:1,xPercent:0,skewX:0,ease:punchgs.Power3.easeOut,overwrite:"all"},.3,{autoAlpha:0,skewX:-60,xPercent:-100,z:0,ease:punchgs.Power2.easeOut,overwrite:"all"}],[".esg-skewrightout",.5,{autoAlpha:1,xPercent:0,skewX:0,ease:punchgs.Power3.easeOut,overwrite:"all"},{xPercent:100,y:0,scale:1,rotationZ:0,rotationX:0,rotationY:0,skewX:-60,skewY:0,autoAlpha:0,transformOrigin:"50% 50%"},.3,{autoAlpha:1,xPercent:0,skewX:0,ease:punchgs.Power3.easeOut,overwrite:"all"}],[".esg-skewleft",.5,{xPercent:100,y:0,scale:1,rotationZ:0,rotationX:0,rotationY:0,skewX:-60,skewY:0,autoAlpha:0,transformOrigin:"50% 50%"},{autoAlpha:1,xPercent:0,skewX:0,ease:punchgs.Power3.easeOut,overwrite:"all"},.3,{autoAlpha:0,xPercent:100,z:0,skewX:60,ease:punchgs.Power2.easeOut,overwrite:"all"}],[".esg-skewleftout",.5,{autoAlpha:1,xPercent:0,skewX:0,ease:punchgs.Power3.easeOut,overwrite:"all"},{xPercent:-100,y:0,scale:1,rotationZ:0,rotationX:0,rotationY:0,skewX:60,skewY:0,autoAlpha:0,transformOrigin:"50% 50%"},.3,{autoAlpha:1,xPercent:0,skewX:0,ease:punchgs.Power3.easeOut,overwrite:"all"}],[".esg-shifttotop",.5,{x:0,y:0,scale:1,rotationZ:0,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:1,transformOrigin:"50% 50%"},{autoAlpha:1,y:0,ease:punchgs.Power3.easeOut,overwrite:"all"},.3,{autoAlpha:1,y:0,z:0,ease:punchgs.Power2.easeOut,overwrite:"all"}],[".esg-rollleft",.5,{xPercent:50,y:0,scale:1,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:0,rotationZ:90,transformOrigin:"50% 50%"},{autoAlpha:1,xPercent:0,rotationZ:0,ease:punchgs.Power3.easeOut,overwrite:"all"},.3,{autoAlpha:0,xPercent:50,z:0,rotationZ:90,ease:punchgs.Power2.easeOut,overwrite:"all"}],[".esg-rollleftout",.5,{autoAlpha:1,xPercent:0,rotationZ:0,ease:punchgs.Power3.easeOut,overwrite:"all"},{xPercent:50,y:0,scale:1,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:0,rotationZ:90,transformOrigin:"50% 50%"},.3,{autoAlpha:1,xPercent:0,rotationZ:0,ease:punchgs.Power3.easeOut,overwrite:"all"}],[".esg-rollright",.5,{xPercent:-50,y:0,scale:1,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:0,rotationZ:-90,transformOrigin:"50% 50%"},{autoAlpha:1,xPercent:0,rotationZ:0,ease:punchgs.Power3.easeOut,overwrite:"all"},.3,{autoAlpha:0,xPercent:-50,rotationZ:-90,z:0,ease:punchgs.Power2.easeOut,overwrite:"all"}],[".esg-rollrightout",.5,{autoAlpha:1,xPercent:0,rotationZ:0,ease:punchgs.Power3.easeOut,overwrite:"all"},{xPercent:-50,y:0,scale:1,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:0,rotationZ:-90,transformOrigin:"50% 50%"},.3,{autoAlpha:1,xPercent:0,rotationZ:0,ease:punchgs.Power3.easeOut,overwrite:"all"}],[".esg-falldown",.4,{x:0,scale:1,rotationZ:0,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:0,yPercent:-100},{autoAlpha:1,yPercent:0,ease:punchgs.Power3.easeOut,overwrite:"all"},.4,{yPercent:-100,autoAlpha:0,z:0,ease:punchgs.Power2.easeOut,delay:.2,overwrite:"all"}],[".esg-falldownout",.4,{autoAlpha:1,yPercent:0,ease:punchgs.Back.easeOut,overwrite:"all"},{x:0,scale:1,rotationZ:0,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:0,yPercent:100},.4,{autoAlpha:1,yPercent:0,ease:punchgs.Power3.easeOut,overwrite:"all"}],[".esg-rotatescale",.3,{x:0,y:0,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:0,rotationZ:80,scale:.6,transformOrigin:"50% 50%"},{autoAlpha:1,scale:1,rotationZ:0,ease:punchgs.Back.easeOut,overwrite:"all"},.3,{autoAlpha:0,scale:.6,z:0,rotationZ:80,ease:punchgs.Power2.easeOut,overwrite:"all"}],[".esg-rotatescaleout",.3,{autoAlpha:1,scale:1,rotationZ:0,ease:punchgs.Back.easeOut,overwrite:"all"},{x:0,y:0,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:0,rotationZ:80,scale:.6,transformOrigin:"50% 50%"},.3,{autoAlpha:1,scale:1,rotationZ:0,ease:punchgs.Back.easeOut,overwrite:"all"}],[".esg-zoomintocorner",.5,{x:0,y:0,scale:1,rotationZ:0,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:1,transformOrigin:"20% 50%"},{autoAlpha:1,scale:1.2,x:0,y:0,ease:punchgs.Power3.easeOut,overwrite:"all"},.5,{autoAlpha:0,x:0,y:0,scale:1,autoAlpha:1,z:0,ease:punchgs.Power2.easeOut,overwrite:"all"}],[".esg-zoomouttocorner",.5,{x:0,y:0,scale:1.2,rotationZ:0,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:1,transformOrigin:"80% 50%"},{autoAlpha:1,scale:1,x:0,y:0,ease:punchgs.Power3.easeOut,overwrite:"all"},.5,{autoAlpha:0,x:0,y:0,scale:1.2,autoAlpha:1,z:0,ease:punchgs.Power2.easeOut,overwrite:"all"}],[".esg-zoomtodefault",.5,{x:0,y:0,scale:1.2,rotationZ:0,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:1,transformOrigin:"50% 50%"},{autoAlpha:1,scale:1,x:0,y:0,ease:punchgs.Power3.easeOut,overwrite:"all"},.5,{autoAlpha:0,x:0,y:0,scale:1.2,autoAlpha:1,z:0,ease:punchgs.Power2.easeOut,overwrite:"all"}],[".esg-zoomback",.5,{x:0,y:0,scale:.2,rotationZ:0,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:0,transformOrigin:"50% 50%"},{autoAlpha:1,scale:1,x:0,y:0,ease:punchgs.Back.easeOut,overwrite:"all"},.5,{autoAlpha:0,x:0,y:0,scale:.2,autoAlpha:0,z:0,ease:punchgs.Power2.easeOut,overwrite:"all"}],[".esg-zoombackout",.5,{autoAlpha:1,scale:1,x:0,y:0,ease:punchgs.Back.easeOut,overwrite:"all"},{x:0,y:0,scale:.2,rotationZ:0,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:0,transformOrigin:"50% 50%"},.5,{autoAlpha:1,scale:1,x:0,y:0,ease:punchgs.Back.easeOut,overwrite:"all"}],[".esg-zoomfront",.5,{x:0,y:0,scale:1.5,rotationZ:0,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:0,transformOrigin:"50% 50%"},{autoAlpha:1,scale:1,x:0,y:0,ease:punchgs.Power3.easeOut,overwrite:"all"},.5,{autoAlpha:0,x:0,y:0,scale:1.5,z:0,ease:punchgs.Power2.easeOut,overwrite:"all"}],[".esg-zoomfrontout",.5,{autoAlpha:1,scale:1,x:0,y:0,ease:punchgs.Back.easeOut,overwrite:"all"},{x:0,y:0,scale:1.5,rotationZ:0,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:0,transformOrigin:"50% 50%"},.5,{autoAlpha:1,scale:1,x:0,y:0,ease:punchgs.Back.easeOut,overwrite:"all"}],[".esg-flyleft",.8,{x:-80,y:0,z:0,scale:.3,rotationZ:0,rotationY:75,rotationX:10,skewX:0,skewY:0,autoAlpha:.01,transformOrigin:"30% 10%"},{x:0,y:0,rotationY:0,z:.001,rotationX:0,rotationZ:0,autoAlpha:1,scale:1,x:0,y:0,z:0,ease:punchgs.Power3.easeInOut,overwrite:"all"},.8,{autoAlpha:.01,x:-40,y:0,z:300,rotationY:60,rotationX:20,overwrite:"all"}],[".esg-flyleftout",.8,{x:0,y:0,rotationY:0,z:.001,rotationX:0,rotationZ:0,autoAlpha:1,scale:1,x:0,y:0,z:0,ease:punchgs.Power3.easeInOut,overwrite:"all"},{x:-80,y:0,z:0,scale:.3,rotationZ:0,rotationY:75,rotationX:10,skewX:0,skewY:0,autoAlpha:.01,transformOrigin:"30% 10%"},.8,{x:0,y:0,rotationY:0,z:.001,rotationX:0,rotationZ:0,autoAlpha:1,scale:1,x:0,y:0,z:0,ease:punchgs.Power3.easeInOut,overwrite:"all"}],[".esg-flyright",.8,{scale:1,skewX:0,skewY:0,autoAlpha:0,x:80,y:0,z:0,scale:.3,rotationZ:0,rotationY:-75,rotationX:10,transformOrigin:"70% 20%"},{x:0,y:0,rotationY:0,z:.001,rotationX:0,autoAlpha:1,scale:1,x:0,y:0,z:0,ease:punchgs.Power3.easeInOut,overwrite:"all"},.8,{autoAlpha:0,x:40,y:-40,z:300,rotationY:-60,rotationX:-40,overwrite:"all"}],[".esg-flyrightout",.8,{x:0,y:0,rotationY:0,z:.001,rotationX:0,autoAlpha:1,scale:1,x:0,y:0,z:0,ease:punchgs.Power3.easeInOut,overwrite:"all"},{scale:1,skewX:0,skewY:0,autoAlpha:0,x:80,y:0,z:0,scale:.3,rotationZ:0,rotationY:-75,rotationX:10,transformOrigin:"70% 20%"},.8,{x:0,y:0,rotationY:0,z:.001,rotationX:0,autoAlpha:1,scale:1,x:0,y:0,z:0,ease:punchgs.Power3.easeInOut,overwrite:"all"}],[".esg-mediazoom",.3,{x:0,y:0,scale:1,rotationZ:0,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:1,transformOrigin:"50% 50%"},{autoAlpha:1,scale:1.4,x:0,y:0,ease:punchgs.Back.easeOut,overwrite:"all"},.3,{autoAlpha:0,x:0,y:0,scale:1,z:0,ease:punchgs.Power2.easeOut,overwrite:"all"}],[".esg-zoomandrotate",.6,{x:0,y:0,scale:1,rotationZ:0,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:1,transformOrigin:"50% 50%"},{autoAlpha:1,scale:1.4,x:0,y:0,rotationZ:30,ease:punchgs.Power2.easeOut,overwrite:"all"},.4,{x:0,y:0,scale:1,z:0,rotationZ:0,ease:punchgs.Power2.easeOut,overwrite:"all"}],[".esg-pressback",.5,{x:0,y:0,scale:1,rotationZ:0,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:1,transformOrigin:"50% 50%"},{rotationY:0,autoAlpha:1,scale:.8,ease:punchgs.Power3.easeOut,overwrite:"all"},.3,{rotationY:0,autoAlpha:1,z:0,scale:1,ease:punchgs.Power2.easeOut,overwrite:"all"}],[".esg-3dturnright",.5,{x:0,y:0,scale:1,rotationZ:0,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:1,transformPerspective:600},{x:-40,y:0,scale:.8,rotationZ:2,rotationX:5,rotationY:-28,skewX:0,skewY:0,autoAlpha:1,transformOrigin:"100% 50% 40%",transformPerspective:600,ease:punchgs.Power3.easeOut,overwrite:"all"},.3,{z:0,x:0,y:0,scale:1,rotationZ:0,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:1,force3D:"auto",ease:punchgs.Power2.easeOut,overwrite:"all"},true]];jQuery.fn.extend({tpessential:function(e){jQuery.fn.tpessential.defaults={forceFullWidth:"off",forceFullScreen:"off",fullScreenOffsetContainer:"",row:3,column:4,space:10,pageAnimation:"fade",animSpeed:600,delayBasic:.08,smartPagination:"on",paginationScrollToTop:"off",paginationScrollToTopOffset:200,layout:"even",rtl:"off",aspectratio:"16:9",bgPosition:"center center",bgSize:"cover",videoJsPath:"",overflowoffset:0,mainhoverdelay:0,rowItemMultiplier:[],filterGroupClass:"",filterType:"",filterLogic:"or",evenGridMasonrySkinPusher:"on",loadMoreType:"none",loadMoreItems:[],loadMoreAmount:5,loadMoreTxt:"Load More",loadMoreNr:"on",loadMoreEndTxt:"No More Items for the Selected Filter",loadMoreAjaxUrl:"",loadMoreAjaxToken:"",loadMoreAjaxAction:"",lazyLoad:"off",lazyLoadColor:"#ff0000",gridID:0,spinner:"",spinnerColor:"",lightBoxMode:"single",cobblesPattern:"",googleFonts:"",googleFontJS:"//ajax.googleapis.com/ajax/libs/webfont/1/webfont.js",ajaxContentTarget:"",ajaxScrollToOnLoad:"off",ajaxScrollToOffset:100,ajaxCallback:"",ajaxCallbackArgument:"on",ajaxCssUrl:"",ajaxJsUrl:"",ajaxCloseButton:"on",ajaxNavButton:"on",ajaxCloseTxt:"Close",ajaxCloseType:"type1",ajaxClosePosition:"tr",ajaxCloseInner:"true",ajaxCloseStyle:"light",ajaxTypes:[]};e=jQuery.extend({},jQuery.fn.tpessential.defaults,e);if(typeof WebFontConfig=="undefined")WebFontConfig=new Object;return this.each(function(){var t=e;var n=jQuery(this);if(n==undefined)return false;n.parent().css({position:"relative"});if(t.layout=="cobbles"){t.layout="even";t.evenCobbles="on"}else{t.evenCobbles="off"}if(t.get!="true"&&t.get!=true){t.get=true;if(t.filterGroupClass==undefined||t.filterGroupClass.length==0){t.filterGroupClass="#"+n.attr("id")}else t.filterGroupClass="."+t.filterGroupClass;if(window.tplogs==true)try{console.groupCollapsed("Essential Grid 1.2.1 Initialisation on "+n.attr("id"));console.groupCollapsed("Used Options:");console.info(e);console.groupEnd();console.groupCollapsed("Tween Engine:")}catch(r){}if(punchgs.TweenLite==undefined){if(window.tplogs==true)try{console.error("GreenSock Engine Does not Exist!")}catch(r){}return false}punchgs.force3D=true;if(window.tplogs==true)try{console.info("GreenSock Engine Version in Essential Grid:"+punchgs.TweenLite.version)}catch(r){}punchgs.TweenLite.lagSmoothing(2e3,16);punchgs.force3D="auto";if(window.tplogs==true)try{console.groupEnd();console.groupEnd()}catch(r){}jQuery("body").data("fullScreenMode",false);jQuery(window).on("mozfullscreenchange webkitfullscreenchange fullscreenchange",function(){jQuery("body").data("fullScreenMode",!jQuery("body").data("fullScreenMode"))});buildLoader(n.parent(),t);if(t.firstshowever==undefined)jQuery(t.filterGroupClass+".esg-navigationbutton,"+t.filterGroupClass+" .esg-navigationbutton").css({visibility:"hidden"});n.parent().append('
');n.wrap('
');var i=n.parent().parent().find(".esg-relative-placeholder").offset().left;if(t.forceFullWidth=="on"||t.forceFullScreen=="on")n.closest(".esg-container-fullscreen-forcer").css({left:0-i,width:jQuery(window).width()});t.animDelay=t.delayBasic==0?"off":"on";t.container=n;n.find("ul").first().addClass("mainul").wrap('
');var s=jQuery(t.filterGroupClass+".esg-navbutton-solo-left,"+t.filterGroupClass+" .esg-navbutton-solo-left");var o=jQuery(t.filterGroupClass+".esg-navbutton-solo-right,"+t.filterGroupClass+" .esg-navbutton-solo-right");if(s.length>0){s.css({marginTop:0-s.height()/2});s.appendTo(n.find(".esg-overflowtrick"))}if(o.length>0){o.css({marginTop:0-o.height()/2});o.appendTo(n.find(".esg-overflowtrick"))}punchgs.CSSPlugin.defaultTransformPerspective=1200;t.animSpeed=t.animSpeed/1e3;t.delayBasic=t.delayBasic/100;setOptions(n,t);t.filter=t.statfilter;t.origcolumn=t.column;t.currentpage=0;n.addClass("esg-layout-"+t.layout);var u=loadVideoApis(n,t);if(t.layout=="even"&&t.forceFullScreen=="on"){var a=jQuery(window).height();if(t.fullScreenOffsetContainer!=undefined){try{var f=t.fullScreenOffsetContainer.split(",");jQuery.each(f,function(e,n){a=a-jQuery(n).outerHeight(true);if(a0)d=false});if(WebFontConfig.active==undefined&&d){WebFontConfig={google:{families:t.googleFonts},active:function(){h(n,t)},inactive:function(){h(n,t)},timeout:1500};var v=document.createElement("script");v.src=("https:"==document.location.protocol?"https":"http")+"://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js";v.type="text/javascript";v.async="true";var m=document.getElementsByTagName("script")[0];m.parentNode.insertBefore(v,m)}else{h(n,t)}}else{h(n,t)}if(t.loadMoreType=="button"){n.append('
LOAD MORE
');var g=n.find(".esg-loadmore"),y=t.loadMoreTxt+" ("+checkMoreToLoad(n,t).length+")";if(t.loadMoreNr=="off")y=t.loadMoreTxt;g.html(y);g.click(function(){if(g.data("loading")!=1)loadMoreItems(n,t)})}else if(t.loadMoreType=="scroll"){n.append('
LOAD MORE
');var g=n.find(".esg-loadmore"),y=t.loadMoreTxt+" ("+checkMoreToLoad(n,t).length+")";if(t.loadMoreNr=="off")y=t.loadMoreTxt;g.html(y);function b(e,n){var r=e.offset().top+e.height()-jQuery(document).scrollTop();if(jQuery(window).height()>r){if(n.data("loading")!=1){n.data("loading",1);loadMoreItems(e,t)}}}jQuery(document,window).scroll(function(){b(n,g)});b(n,g)}checkAvailableFilters(n,t);tabBlurringCheck(n,t)}})},esappend:function(e){var t=jQuery(this);prepareItemsInGrid(opt,true);organiseGrid(opt);prepareSortingAndOrders(t);return opt.lastslide},esskill:function(){var e=jQuery(this);e.find("*").each(function(){jQuery(this).off("click, focus, focusin, hover, play, ended, stop, pause, essentialready");jQuery(this).remove()});e.remove();e.html();e=null},esreadsettings:function(e){e=e==undefined?new Object:e;var t=jQuery(this);var n=getOptions(t);return n},esredraw:function(e){e=e==undefined?new Object:e;var t=jQuery(this);var n=getOptions(t);if(e.space!=undefined)n.space=parseInt(e.space,0);if(e.row!=undefined)n.row=parseInt(e.row,0);if(e.rtl!=undefined)n.rtl=e.rtl;if(e.aspectratio!=undefined)n.aspectratio=e.aspectratio;if(e.forceFullWidth!=undefined){n.forceFullWidth=e.forceFullWidth;if(n.forceFullWidth=="on"){var r=t.parent().parent().find(".esg-relative-placeholder").offset().left;t.closest(".esg-container-fullscreen-forcer").css({left:0-r,width:jQuery(window).width()})}else t.closest(".esg-container-fullscreen-forcer").css({left:0,width:"auto"})}if(e.rowItemMultiplier!=undefined)n.rowItemMultiplier=e.rowItemMultiplier;if(e.responsiveEntries!=undefined)n.responsiveEntries=e.responsiveEntries;if(e.column!=undefined){if(e.column<=0||e.column>=20){var i=getBestFitColumn(n,jQuery(window).width(),"id");n.column=i.column;n.columnindex=i.index}else{n.column=parseInt(e.column,0)}n.origcolumn=n.column}if(e.animSpeed!=undefined)n.animSpeed=e.animSpeed/1e3;if(e.delayBasic!=undefined)n.delayBasic=e.delayBasic/100;if(e.pageAnimation!=undefined)n.pageAnimation=e.pageAnimation;if(e.changedAnim!=undefined)n.changedAnim=e.changedAnim;n.started=true;if(e.silent==true)n.silent=true;setOptions(t,n);setItemsOnPages(n);organiseGrid(n)},esquickdraw:function(e){var t=jQuery(this);var n=getOptions(t);n.silent=true;setOptions(t,n);setItemsOnPages(n);organiseGrid(n)},esreinit:function(e){var t=jQuery(this);prepareItemsInGrid(opt,true);organiseGrid(opt);prepareSortingAndOrders(t);return opt.lastslide},somemethodb:function(e){return this.each(function(){var e=jQuery(this)})}});var vis=function(){var e,t,n={hidden:"visibilitychange",webkitHidden:"webkitvisibilitychange",mozHidden:"mozvisibilitychange",msHidden:"msvisibilitychange"};for(e in n){if(e in document){t=n[e];break}}return function(n){if(n)document.addEventListener(t,n);return!document[e]}}();var tabBlurringCheck=function(){var e=document.documentMode===undefined,t=window.chrome;if(!jQuery("body").hasClass("esg-blurlistenerexists")){jQuery("body").addClass("esg-blurlistenerexists");if(e&&!t){jQuery(window).on("focusin",function(){setTimeout(function(){jQuery("body").find(".esg-grid.esg-container").each(function(){jQuery(this).esquickdraw()})},300)}).on("focusout",function(){})}else{if(window.addEventListener){window.addEventListener("focus",function(e){setTimeout(function(){jQuery("body").find(".esg-grid.esg-container").each(function(){jQuery(this).esquickdraw()})},300)},false)}else{window.attachEvent("focus",function(e){setTimeout(function(){jQuery("body").find(".esg-grid.esg-container").each(function(){jQuery(this).esquickdraw()})},300)})}}}};var is_mobile=function(){var e=["android","webos","iphone","ipad","blackberry","Android","webos",,"iPod","iPhone","iPad","Blackberry","BlackBerry"];var t=false;for(i in e){if(navigator.userAgent.split(e[i]).length>1){t=true}}return t};var waitForLoads=function(e,t){var n=e.closest(".esg-grid").parent().parent().find(".esg-loader");jQuery.each(e,function(e,r){r=jQuery(r);if(n.length>0)punchgs.TweenLite.to(n,.2,{autoAlpha:1,delay:.5});if(!r.hasClass("loadedmedia")&&t.layout!="even"&&r.find("img").length>0)if(r.hasClass("itemtoshow"))r.removeClass("itemtoshow").addClass("showmeonload");if(!r.hasClass("loadedmedia")&&t.layout!="even"&&r.find("img").length==0){evenImageRatio(r.find("img"),t);waittorungGrid(r,t,true)}});var r=setInterval(function(){t.bannertimeronpause=true;t.cd=0;var i=0;e.find("img").each(function(e){var n=jQuery(this);if(n.data("lazydone")!=1&&t.lazyLoad=="on"&&n.parent().find(".lazyloadcover").length<1){n.parent().append('
')}if(n.data("lazydone")!=1&&i<3){i++;loadAllPrepared(jQuery(this),t)}});if(i==0){if(n.length>0){punchgs.TweenLite.killTweensOf(n,false);punchgs.TweenLite.to(n,.2,{autoAlpha:0})}}if(i==0&&!e.closest(".mainul").hasClass("gridorganising")){clearInterval(r);runGrid(t)}},50)}})(jQuery);(function(e,t){"use strict";function p(e){return e&&e.toLowerCase?e.toLowerCase():e}function d(e,t){for(var r=0,i=e.length;rv?1:0)}c(f,function(e){r=e.call(e,p,d,v,r)});if(r===0)x++}return r};for(v=0,g=arguments.length;vC.length)C.length=N.length-1}else{if(C.push(O)>N.length)N.length=C.length}}if(N.length>C.length)C.length=N.length;T=N.length;if(T===0){T=N.length=1;C.push({})}for(v=0,g=T;v0)w[l].s.push({s:u,e:i,n:n});else w[l].n.push({e:i,n:n})});c(w,function(e){e.s.sort(A)});c(w,function(e){var t=e.s,r=e.n,i=t.length,o=r.length,u=i+o,a=[],f=u,l=[0,0];switch(_.place){case"first":c(t,function(e){f=s(f,e.n)});break;case"org":c(t,function(e){a.push(e.n)});break;case"end":f=o;break;default:f=0}for(v=0;v=f&&v https://demolicionescordoba.es/wp-content/themes/buildpress/assets/js/modernizr.custom.24530.js /* Modernizr 2.8.3 (Custom Build) | MIT & BSD * Build: http://modernizr.com/download/#-flexbox-mq-cssclasses-addtest-prefixed-teststyles-testprop-testallprops-hasevent-prefixes-domprefixes */ ;window.Modernizr=function(a,b,c){function B(a){j.cssText=a}function C(a,b){return B(m.join(a+";")+(b||""))}function D(a,b){return typeof a===b}function E(a,b){return!!~(""+a).indexOf(b)}function F(a,b){for(var d in a){var e=a[d];if(!E(e,"-")&&j[e]!==c)return b=="pfx"?e:!0}return!1}function G(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:D(f,"function")?f.bind(d||b):f}return!1}function H(a,b,c){var d=a.charAt(0).toUpperCase()+a.slice(1),e=(a+" "+o.join(d+" ")+d).split(" ");return D(b,"string")||D(b,"undefined")?F(e,b):(e=(a+" "+p.join(d+" ")+d).split(" "),G(e,b,c))}var d="2.8.3",e={},f=!0,g=b.documentElement,h="modernizr",i=b.createElement(h),j=i.style,k,l={}.toString,m=" -webkit- -moz- -o- -ms- ".split(" "),n="Webkit Moz O ms",o=n.split(" "),p=n.toLowerCase().split(" "),q={},r={},s={},t=[],u=t.slice,v,w=function(a,c,d,e){var f,i,j,k,l=b.createElement("div"),m=b.body,n=m||b.createElement("body");if(parseInt(d,10))while(d--)j=b.createElement("div"),j.id=e?e[d]:h+(d+1),l.appendChild(j);return f=["­",'"].join(""),l.id=h,(m?l:n).innerHTML+=f,n.appendChild(l),m||(n.style.background="",n.style.overflow="hidden",k=g.style.overflow,g.style.overflow="hidden",g.appendChild(n)),i=c(l,a),m?l.parentNode.removeChild(l):(n.parentNode.removeChild(n),g.style.overflow=k),!!i},x=function(b){var c=a.matchMedia||a.msMatchMedia;if(c)return c(b)&&c(b).matches||!1;var d;return w("@media "+b+" { #"+h+" { position: absolute; } }",function(b){d=(a.getComputedStyle?getComputedStyle(b,null):b.currentStyle)["position"]=="absolute"}),d},y=function(){function d(d,e){e=e||b.createElement(a[d]||"div"),d="on"+d;var f=d in e;return f||(e.setAttribute||(e=b.createElement("div")),e.setAttribute&&e.removeAttribute&&(e.setAttribute(d,""),f=D(e[d],"function"),D(e[d],"undefined")||(e[d]=c),e.removeAttribute(d))),e=null,f}var a={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return d}(),z={}.hasOwnProperty,A;!D(z,"undefined")&&!D(z.call,"undefined")?A=function(a,b){return z.call(a,b)}:A=function(a,b){return b in a&&D(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=u.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(u.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(u.call(arguments)))};return e}),q.flexbox=function(){return H("flexWrap")};for(var I in q)A(q,I)&&(v=I.toLowerCase(),e[v]=q[I](),t.push((e[v]?"":"no-")+v));return e.addTest=function(a,b){if(typeof a=="object")for(var d in a)A(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,typeof f!="undefined"&&f&&(g.className+=" "+(b?"":"no-")+a),e[a]=b}return e},B(""),i=k=null,e._version=d,e._prefixes=m,e._domPrefixes=p,e._cssomPrefixes=o,e.mq=x,e.hasEvent=y,e.testProp=function(a){return F([a])},e.testAllProps=H,e.testStyles=w,e.prefixed=function(a,b,c){return b?H(a,b,c):H(a,"pfx")},g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+t.join(" "):""),e}(this,this.document); // source --> https://demolicionescordoba.es/wp-content/themes/buildpress/bower_components/respimage/respimage.min.js /*! respimage - v1.2.0 - 2014-12-08 Licensed MIT */ !function(a,b,c){"use strict";function d(a){return a.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}function e(){var b;R=!1,W=a.devicePixelRatio,U={},V={},b=(W||1)*E.xQuant,E.uT||(E.maxX=Math.max(1.3,E.maxX),b=Math.min(b,E.maxX),w.DPR=b),X.width=Math.max(a.innerWidth||0,C.clientWidth),X.height=Math.max(a.innerHeight||0,C.clientHeight),X.vw=X.width/100,X.vh=X.height/100,X.em=w.getEmValue(),X.rem=X.em,r=E.lazyFactor/2,r=r*b+r,s=.1*b,o=.5+.2*b,p=.5+.25*b,(q=X.width>X.height)||(r*=.9),I&&(r*=.9)}function f(a){if(!(a in T)){var b=[1,"x"],c=d(a||"");c&&(c=c.replace(N,""),b=c.match(M)?[1*RegExp.$1,RegExp.$2]:!1),T[a]=b}return T[a]}function g(a,b,c){var d=b*Math.pow(a,2);return q||(d/=1.6),a+=d,a>c}function h(a){if(!a.getBoundingClientRect)return!0;var b,c,d,e,f=a.getBoundingClientRect();return!!((b=f.bottom)>=-9&&(e=f.top)<=X.height+9&&(c=f.right)>=-9&&(d=f.left)<=X.height+9&&(b||c||d||e))}function i(a){var b,c=w.getSet(a),d=!1;"pending"!=c&&(d=!0,c&&(b=w.setRes(c),d=w.applySetCandidate(b,a))),a[w.ns].evaled=d}function j(a,b){return a.res-b.res}function k(a,b,c){var d;return!c&&b&&(c=a[w.ns].sets,c=c&&c[c.length-1]),d=l(b,c),d&&(b=w.makeUrl(b),a[w.ns].curSrc=b,a[w.ns].curCan=d,d.res||bb(d,d.set.sizes)),d}function l(a,b){var c,d,e;if(a&&b)for(e=w.parseSet(b),a=w.makeUrl(a),c=0;cc;c++)e=g[c],e[w.ns]=!0,f=e.getAttribute("srcset"),f&&b.push({srcset:f,media:e.getAttribute("media"),type:e.getAttribute("type"),sizes:e.getAttribute("sizes")})}function n(a){var b,c,d;if(a)for(d=w.parseSet(a),b=0;b35,J="currentSrc",K=/\s+\+?\d+(e\d+)?w/,L=/(\([^)]+\))?\s*(.+)/,M=/^([\+eE\d\.]+)(w|x)$/,N=/\s*\d+h\s*/,O=a.respimgCFG,P=("https:"==location.protocol,"position:absolute;left:0;visibility:hidden;display:block;padding:0;border:none;font-size:1em;width:1em;overflow:hidden;clip:rect(0px, 0px, 0px, 0px)"),Q="font-size:100%!important;",R=!0,S={},T={},U={},V={},W=a.devicePixelRatio,X={px:1,"in":96},Y=b.createElement("a"),Z=!1,$=function(a,b,c,d){a.addEventListener?a.addEventListener(b,c,d||!1):a.attachEvent&&a.attachEvent("on"+b,c)},_=function(a,b,c,d){a.removeEventListener?a.removeEventListener(b,c,d||!1):a.detachEvent&&a.detachEvent("on"+b,c)},ab=function(){var a={},b=/^([\d\.]+)(em|vw|px)$/,c=function(){for(var a=arguments,b=0,c=a[0];++b in a;)c=c.replace(a[b],a[++b]);return c},d=function(b){return a[b]||(a[b]="return "+c((b||"").toLowerCase(),/\band\b/g,"&&",/,/g,"||",/min-([a-z-\s]+):/g,"e.$1>=",/max-([a-z-\s]+):/g,"e.$1<=",/calc([^)]+)/g,"($1)",/(\d+[\.]*[\d]*)([a-z]+)/g,"($1 * e.$2)",/^(?!(e.[a-z]|[0-9\.&=|><\+\-\*\(\)\/])).*/gi,"")+";"),a[b]};return function(a,c){var e;if(!(a in U))if(U[a]=!1,c&&(e=a.match(b)))U[a]=e[1]*X[e[2]];else try{U[a]=new Function("e",d(a))(X)}catch(f){}return U[a]}}(),bb=function(a,b){return a.w?(a.cWidth=w.calcListLength(b||"100vw"),a.res=a.w/a.cWidth):a.res=a.x,a},cb=function(a){var c,d,e,f=a||{};if(f.elements&&1==f.elements.nodeType&&("IMG"==f.elements.nodeName.toUpperCase()?f.elements=[f.elements]:(f.context=f.elements,f.elements=null)),c=f.elements||w.qsa(f.context||b,f.reevaluate||f.reparse?w.sel:w.selShort),e=c.length){for(w.setupRun(f),Z=!0,d=0;e>d;d++)w.fillImg(c[d],f);w.teardownRun(f)}},db=function(){var a=function(){_(this,"load",a),_(this,"error",a),w.fillImgs({elements:[this]})};return function(b){_(b,"load",a),_(b,"error",a),$(b,"error",a),$(b,"load",a)}}();J in y||(J="src"),D["image/jpeg"]=!0,D["image/gif"]=!0,D["image/png"]=!0,D["image/svg+xml"]=b.implementation.hasFeature("http://wwwindow.w3.org/TR/SVG11/feature#Image","1.1"),w.ns=("ri"+(new Date).getTime()).substr(0,9),w.supSrcset="srcset"in y,w.supSizes="sizes"in y,w.selShort="picture>img,img[srcset]",w.sel=w.selShort,w.cfg=E,w.supSrcset&&(w.sel+=",img["+G+"]"),w.DPR=W||1,w.u=X,w.types=D,u=w.supSrcset&&!w.supSizes,w.setSize=x,w.makeUrl=function(a){return Y.href=a,Y.href},w.qsa=function(a,b){return a.querySelectorAll(b)},w.matchesMedia=function(){return w.matchesMedia=a.matchMedia&&(matchMedia("(min-width: 0.1em)")||{}).matches?function(a){return!a||matchMedia(a).matches}:w.mMQ,w.matchesMedia.apply(this,arguments)},w.mMQ=function(a){return a?ab(a):!0},w.calcLength=function(a){var b=ab(a,!0)||!1;return 0>b&&(b=!1),b},w.supportsType=function(a){return a?D[a]:!0},w.parseSize=function(a){var b;return S[a]||(b=(a||"").match(L),S[a]={media:b&&b[1],length:b&&b[2]}),S[a]},w.parseSet=function(a){if(!a.cands){var b,c,d,e,g,h,i=a.srcset;for(a.cands=[];i;)i=i.replace(/^\s+/g,""),b=i.search(/\s/g),d=null,-1!=b?(c=i.slice(0,b),e=c.charAt(c.length-1),","!=e&&c||(c=c.replace(/,+$/,""),d=""),i=i.slice(b+1),null==d&&(g=i.indexOf(","),-1!=g?(d=i.slice(0,g),i=i.slice(g+1)):(d=i,i=""))):(c=i,i=""),c&&(d=f(d))&&(h={url:c.replace(/^,+/,""),set:a},h[d[1]]=d[0],a.cands.push(h))}return a.cands},w.getEmValue=function(){var a;if(!t&&(a=b.body)){var c=b.createElement("div"),d=C.style.cssText,e=a.style.cssText;c.style.cssText=P,C.style.cssText=Q,a.style.cssText=Q,a.appendChild(c),t=c.offsetWidth,a.removeChild(c),t=parseFloat(t,10),C.style.cssText=d,a.style.cssText=e}return t||16},w.calcListLength=function(a){if(!(a in V)||E.uT){var b,c,e,f,g,h,i=d(a).split(/\s*,\s*/),j=!1;for(g=0,h=i.length;h>g&&(b=i[g],c=w.parseSize(b),e=c.length,f=c.media,!e||!w.matchesMedia(f)||(j=w.calcLength(e))===!1);g++);V[a]=j?j:X.width}return V[a]},w.setRes=function(a){var b;if(a){b=w.parseSet(a);for(var c=0,d=b.length;d>c;c++)bb(b[c],a.sizes)}return b},w.setRes.res=bb,w.applySetCandidate=function(a,b){if(a.length){var c,d,e,f,i,l,m,n,q,t,u,v,x=b[w.ns],y=!0,A=r,B=s;if(n=x.curSrc||b[J],q=x.curCan||k(b,n,a[0].set),d=w.DPR,n&&(q&&q.reso&&(v=q.res,q.res=d?m=q:I||b.complete||!z.call(b,"src")||b.lazyload||(t||!h(b))&&(m=q,u=n,y="L",db(b))),!m)for(v&&(q.res=q.res-(q.res-v)/2),a.sort(j),l=a.length,m=a[l-1],e=0;l>e;e++)if(c=a[e],c.res>=d){f=e-1,m=a[f]&&(i=c.res-d)&&n!=w.makeUrl(c.url)&&g(a[f].res,i,d)?a[f]:c;break}return v&&(q.res=v),m&&(u=w.makeUrl(m.url),x.curSrc=u,x.curCan=m,u!=n&&w.setSrc(b,m),w.setSize(b)),y}},w.setSrc=function(a,b){var c;a.src=b.url,"image/svg+xml"==b.set.type&&(c=a.style.width,a.style.width=a.offsetWidth+1+"px",a.offsetWidth+1&&(a.style.width=c))},w.getSet=function(a){var b,c,d,e=!1,f=a[w.ns].sets;for(b=0;b